#include <iostream>
using namespace std;

int gcm(int x, int y){
    int dai = x > y ? x : y;
    int sho = x > y ? y : x;
    int ama;
    
    while(sho){
        ama = dai % sho;
        dai = sho;
        sho = ama;
    }
    
    return dai;
}

int main() {
    int n, cnt = 0;
    cin >> n;
    for(int i = 0; i < N; i++){
        int c;
        cin >> c;
        if(c != 1 || c == 2 || gcm(2, c) == 1){
            ++cnt;
            continue;
        }
    }
    cout << cnt << endl;
    return 0;
}