eolymp
bolt
Try our new interface for solving problems
Problems

The number of integers Mersenns

The number of integers Mersenns

Time limit 1 second
Memory limit 64 MiB

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

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

Input data

The first line contains the number k - the number of numbers in an array, the following line written the numbers themselves a_1, a_2, …, a_k. (0 < k < 1000, 0a_i < 2^31).

Output data

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

Examples

Input example #1
5
3 7 10 31 63
Output example #1
4