AA is a kindergarten teacher, there are $n$ boys and $n$ girls in her class. Chairs in the classroom are put in a row, children select their seats according to their own preferences. However, AA wants to make boys and girls sit alternately. That is to say, if $n = 2$, 'B' said a boy and 'G' said a girl, she wants her children sit like "BGBG" or "GBGB". So she decides to make some changes, each time she chooses two adjacent children and swap their seats. Now she wants to know how many times she needs to swap at least.