#include <bits/stdc++.h>
using namespace std;
int a[1000];
int demfb(int d)
{
	int b=2,c;
	a[1]=a[2]=1;
	while (a[b]<d)
	{
		b++;
		a[b]=a[b-1]+a[b-2];
	}
	if (a[b]==d) c=1; else c=2;
	return c;
}
int main ()
{
	freopen ("DEMFB.inp", "r", stdin);
	freopen ("DEMFB.out", "w", stdout);
	int c,d=0,n;
	cin>>n;
	int b[n+1];
	for (int i=1; i<=n; i++)
	cin >> b[i];
	for (int y=1; y<=n; y++)
	if (demfb(b[y])==1) c++;
	cout << c;
}
