#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N; int ans=0; REP(i,N){ int a=0,b=0,c=0,d=0; REP(j,4){ string x; cin >> x; if(x=="akai") a++; if(x=="marui") b++; if(x=="okii") c++; if(x=="umai") d++; } if(a==1 && b==1 && c==1 && d==1) ans++; } cout << ans << endl; return 0; }