#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <cctype>
#include <cstdio>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define INF (2 << 28)
#define fr first
#define sc second
using namespace std;

typedef long long ll;
typedef pair<int, int> iP;

int main(){
  
  int i, N, a, cnt = 0;

  cin >> N;
  while(N--) {
    cin >> a;
    bool judge = false;
    for(i = 1; i * i < a; i++) {
      if((a - i) % (2 * i + 1) == 0) {
        judge = true;
        break;
      } 
      // cout << a << endl;
    }
    if(!judge) cnt++;
  }
  cout << cnt << endl;
}