#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, z = 0; cin >> n; while(n--){ bool b = false, c = false, d = false, e = false; for(int i = 0; i < 4; i++){ string a; cin >> a; if(a == "akai") b = true; else if(a == "marui") c = true; else if(a == "okii") d = true; else if(a == "umai") e = true; } if(b && c && d && e) z++; } cout << z << '\n'; return 0; }