Coins
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There are coins on the table. Some of them are heads-up, while others are tails-up. Determine the minimum number of coins that need to be flipped so that all the coins end up facing the same side up.
Input
The first line contains the number of coins . Each of the following lines contains an integer: if the coin is heads-up, and if it is tails-up.
Output
Print the minimum number of coins that need to be flipped.
Examples
Input #1
Answer #1
Submissions 13K
Acceptance rate 55%