#include <fstream>
#include <math.h>

using namespace std;

bool IsSquare(long long a)
{
	return ((long long)sqrt(a) == sqrt(a));
}

int main()
{
	ifstream input("DEMFB.inp");
	ofstream output("DEMFB.out");

	int n;
	int count = 0;
	long long a;
	input >> n;
	for (int i = 0; i < n; i++)
	{
		input >> a;
		if (IsSquare(5 * a * a + 4) == true || IsSquare(5 * a * a - 4) == true)
		{
			count++;
		}
	}
	output << count;
	input.close();
	output.close();
	return 0;
}