#include #include #include using namespace std; int main() { int N; cin >> N; int ans = 0; for (int i = 0; i < N; i++) { set st = {"akai", "marui", "okii", "umai"}; for (int j = 0; j < 4; j++) { string S; cin >> S; st.erase(S); } ans += st.size() == 0; } cout << ans << endl; return 0; }