#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
int k = 0;
if ((a[i] % 6 == 0) && (a[i] % 10 == 4))
k++;
cout << k;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
int k = 0;
for (int i = 0; i < n; i++)
if ((a[i] % 6 == 0) && (a[i] % 10 == 4))
k++;
cout << k;
return 0;
}