Problem: IOI Real Estate rents condominiums. The apartment room handled by this company is 1LDK, and the area is 2xy + x + y as shown in the figure below. However, x and y are positive integers.


Figure_Madori


In the IOI real estate catalog, the areas of condominiums are listed in ascending order (in ascending order), but it was found that some mistakes (those with an impossible area) were mixed in this.

The catalog (input file) has N + 1 lines, the number of rooms is written in the first line, and the area is written in ascending order, one room per line in the following N lines. However, the number of rooms is 100,000 or less, and the area is (2 to the 31st power) -1 = 2,147,483,647 or less. Up to 3 of the 5 input data have 1000 rooms or less and an area of ​​30000 or less.

Output the wrong number of lines (the number of impossible rooms).

In the output file, also include a line feed code on the last line of the output.





Examples

Input

10
4
7
9
10
12
13
16
17
19
20


Output

2


Input

None


Output

None

Solution (in CPP):

Solution:
#include "bits/stdc++.h"
using namespace std;
long long int powint(long long int a, int b) {
	if (b == 0)return 1;
	if (b == 1)return a;
	else {
		long long int ans = 1;
		long long int c = powint(a, b / 2);
		ans *= c*c;
		ans *= (b % 2) ? a : 1;
		return ans;
	}

}
vector<int>primes;
void hurui(const int amax) {
	static bool flag = false;
	if (flag)return;
	vector<int>sos;
	sos = vector<int>(amax + 1, true);
	sos[0] = false; sos[1] = false;
	for (int i = 2; i <= amax; ++i) {
		if (sos[i]) {
			for (int j = 2 * i; j <= amax; j += i)sos[j] = false;
		}
	}
	for (int i = 0; i <= amax; ++i) {
		if (sos[i]) {
			primes.push_back(i);
		}
	}
	flag = true;
}
vector<long long int> divisor(map<long long int, int> s) {
	vector<long long int> res;
	int num = 1;
	for (auto it = s.begin(); it != s.end(); ++it) {
		num *= (*it).second + 1;
	}
	for (int i = 0; i < num; ++i) {
		int bs = i;
		long long int p = 1;
		for (auto it = s.begin(); it != s.end(); ++it) {
			int a = bs % ((*it).second + 1);
			p *= powint((*it).first, a);
			bs /= ((*it).second + 1);
		}
		res.push_back(p);
	}
	return res;
}
map<long long int, int>soinnsuu(long long int a) {
	hurui(1e5);
	map<long long int, int>ans;
	for (auto km : primes) {
		int i = km;
		if (i> a)break;
		while (a%i == 0) {
			ans[i]++;
			a /= i;
		}
	}
	if (a != 1)ans[a]++;
	return ans;
}

bool check(const long long int a) {
	if (a >= 3) {
		return a % 2;
	}
	else {
		return false;
	}
}

int main() {
	int ans = 0;
	int N; cin >> N;
	while (N--) {
		long long int a; cin >> a;
		a = 2 * a + 1;
		auto vs = divisor(soinnsuu(a));
		bool ok = false;
		for (int i = 0; i < vs.size()/2+1; ++i) {
			long long int a = vs[i];
			long long int b = vs[vs.size() - i - 1];
			if (check(a) && check(b))ok = true;
		}
		ans += !ok;
	}
	cout << ans << endl;
	return 0;
}