#include<bits/stdc++.h>
using namespace std;
long int n,x, i, fib1 = 1, fib2 = 1, fib=1,dem=0,a[10000];
void kt(long int x){
while (fib1+fib2 <= x)
{
fib = fib1 + fib2;
fib2 = fib1;
fib1 = fib;
}
if( fib==x)
    {dem++;}
    return;}
int main()
{
	ifstream fi("demfb.inp");
ofstream fo("demfb.out");
fi>>n;
if(n==1){
    dem++;
}
for(i=0;i<n;i++)
{
    fi>>a[i];
    kt(a[i]);
}
fo<<dem;
return 0;
}
