#include <bits/stdc++.h>
using namespace std;

long int f(long int a)
{  long int f0=0,f1=1,f2=-100000000;
   while (f2<a)
   { f2=f0+f1;
      f0=f1;
      f1=f2; }
      if (a==f2){return true;}
      else return false;

}
int main()
{
     ifstream s1("DEMFB.INP");
     ofstream s2("DEMFB.OUT");
      long int n,i,dem=0;
   s1>>n;
   long int a[n+1];
for (i=1;i<=n;i++)
   {
       s1>>a[i];
   }
   for (i=1;i<=n;i++)
   {
       if (f(a[i])==true)
        dem++;
   }
   s2<<dem;
   return 0;
}
