#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>

using namespace std;

int main() {
    int n;
    cin >> n;
    int ret = 0;
    for (int i = 0; i < n; i++) {
        string s;
        cin >> s;
        if (s == "E869120")ret++;
    }
    cout << ret << endl;
    return 0;
}

