eolymp

Coins

Time limit 1 second
Memory limit 128 MiB

There are n coins on the table. Some of them have heads up, and some of them have tails up. Find the minimum number of coins to reverse, so that all coins will be turned up with the same side.

Input data

The first line contains number of coins n (1n100). Each of the next n lines contains one integer: 1 if the coin is tails up or 0 if heads up.

Output data

Print the minimum number of coins to reverse.

Examples

Input example #1
5
1
0
1
1
0
Output example #1
2
Source 2006, XIV St. Petersburg School Programming Team Championship, November 6, Problem B