#include <cstdio>
#include <cstring>
#include <algorithm>

int main()
{
	int S;
	int n;
	
	scanf("%d", &n);
	
	int res = 0;
	for (int i = 0; i < n; i++){
		scanf("%d", &S);
		
		bool ok = false;
		for (int x = 1; x * x < S; x++){
			if ((S + x + 1) % (2 * x + 1) == 0){
				ok = true;
				break;
			}
		}
		res += !ok;
	}
	
	printf("%d\n", res);
	
	return (0);
}