#include <bits/stdc++.h>
using namespace std;
bool check(int n)
{
    int i, fib1 = 1, fib2 = 1, fib = 2;
    if(n==1)return true;
    while (fib1+fib2 <= n)
    {
        fib = fib1 + fib2;
        fib2 = fib1;
        fib1 = fib;
    }
    if(fib==n)return true;
    return false;
}
int main()
{
    ifstream f1("demfb.inp");
    ofstream f2("demfb.out");
    int n;
    f1>>n;
    int a[n];
    for (int i=0;i<n;i++)
    {
        f1>>a[i];
    }
    int t=0;
    for (int i=0;i<n;i++)
    {
        if(check(a[i])==true)
        {
            t++;
        }
    }
    f2<<t;
}
