"More isn't always better. Sometimes it's just more." — Barbara Benedek

In a small Romanian village called Iași, the peaceful life of its inhabitants is threatened by a relentless wave of dark creatures. To defend their home, each villager is ready to fight and their strength is known (a positive integer).
Initially, all villagers are part of the army. In one operation you can remove exactly one villager from the army.
The overall strength of the army is defined as the bitwise AND of the strengths of all remaining villagers.
The bitwise AND of multiple bits is if all bits are , and otherwise. The bitwise AND of multiple numbers is obtained by performing the bitwise AND for each coresponding bit position. For example, .
Task
Determine the minimum number of operations required to maximize the overall strength of the army.
Input data
The first line contains an integer — the population of the village.
The second line contains positive integers — the strengths of each villager.
Output data
On the first line, print the minimum number of operations required.
Constraints and clarifications
- The villagers' strengths are integers between and .
Example
stdin
3
1 5 4
stdout
2