Let be a natural number. There are boys and girls standing in a line, in any arbitrary order. A student will be eligible for receiving candies, if we can choose two students of opposite sex with standing on either side of in ways. Show that the total number of candies does not exceed
VMO 2012
Vietnam Mathematical Olympiad 2012.