#include using namespace std; #define all(v) (v).begin(),(v).end() #define pb(a) push_back(a) #define rep(i, n) for(int i=0;i ans = {"akai", "marui", "okii", "umai"}; int n; cin >> n; int sum = 0; rep(i, n) { vector s(4); rep(j, 4) cin >> s[j]; sort(all(s)); if(s == ans) sum ++; } cout << sum << endl; return 0; }