#include <bits/stdc++.h>

using namespace std;

ifstream fi ("DEMFB.INP");
ofstream fo ("DEMFb.OUT");

bool test (int n){
  int f0=0,f1=1,f2=1;
  while (f0<n){
    f2=f1+f0;
    f0=f1;
    f1=f2;
  }
  if (f0==n){return true;}
  else return false;
}

int main(){
  int n;
  fi>>n;
  int a[n],i,dem=0;
  for (i=0;i<n;i++){
    fi>>a[i];
    if (test(a[i])==true){dem++;}
  }
  fo<<dem;
}
