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:
// -*- coding:utf-8; tab-width:4 -*-
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>

// ティツァツ」テァツュツ?
namespace solution {
    using namespace std;
   
    typedef istringstream ISS;
    typedef ostringstream OSS;
    typedef vector<string> VS;
    typedef long long LL;
    typedef int INT;
    typedef vector<INT> VI;
    typedef vector<VI> VVI;
    typedef pair<INT, INT> II;
    typedef set<LL> SET;

    const int SIZE = 100001;
    int n;
    SET S;

    struct Solution {
        void init() {
            S.clear();
        }
   
        bool input() {
            if ( ! ( cin >> n ) )
                return false;
            for ( int i = 0; i < n; ++ i ) {
                LL a;
                cin >> a;
                S.insert(a);
            }
            return true;
        }

        int solve() {
            int key = 0;
            for ( SET::iterator it_i = S.upper_bound(key);
                    it_i != S.end(); ) {
                key = *it_i;
                for ( int i = 1; 2 * i * i + i + i <= key; ++ i )
                    if ( ( key - i ) % ( 2 * i + 1 ) == 0 ) {
                        S.erase(key);
                        break;
                    }
                it_i = S.upper_bound(key);
            }
            return S.size();
        }

        void output( int result ) {
            cout << result << endl;
        }
      
        int run() {
            while ( init(), input() ) {
                output(solve());
            }
            return 0;
        }
    };
}

int main() {
    return solution::Solution().run();
}