#include <iostream>
#include <string>

using namespace std;

int main()
{
  int n;
  string str;

  cin >> n;
  cin.ignore();
  int count = 0;
  while (n--) {
    cin >> str;
    if (str == "E869120") count++;
  }

  cout << count << endl;
}

