e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

The number of integers Mersenns

The number of integers Mersenns

Mersenn number is a number that is equal to 2n-1, where n - integer.

Given an array of integers, count the number of numbers in it Mersenn.

Input

The first line contains the number k - the number of numbers in an array, the following line written the numbers themselvesa1, a2, …, ak. (0 < k < 1000, 0ai < 231).

Output

Derive a single number - the number of numbers Mersenn in the specified array.

Time limit 1 second
Memory limit 64 MiB
Input example #1
5
3 7 10 31 63
Output example #1
4