Under your help, Joy finally got the job in casino. The boss of the casino is very busy, he can only go to the casino one time every two days. When the boss goes into the casino, he asks Joy to give him the median of the past days’ turnovers. The median is the number in the middle of an array after sorting it. As you know, Joy is not good at math, he asks you for help again!
Now given the turnovers for n days, the boss will come to casino on the first day, and the third day, the fifth day... Please help Joy write a program to output the median of the turnovers when boss comes.