#include #include #include #include using namespace std; int main () { int N; cin >> N; vector amaou = { "akai", "marui", "okii", "umai", }; sort(amaou.begin(), amaou.end()); int ans = 0; for (int _ = 0; _ < N; _++) { vector strawberry; for (int _ = 0; _ < 4; _++) { string s; cin >> s; strawberry.push_back(s); } sort(strawberry.begin(), strawberry.end()); if (amaou == strawberry) { ans++; } } cout << ans << "\n"; }