#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (ll)(n); i++) #define oke cout << "Yes" << '\n'; #define dame cout << "No" << '\n'; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() using HaiI = vector>; using Hai2 = vector>; using HaiB = vector>; using Hai3 = vector>>; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); ll N,M; cin>>N>>M; vectorS(N); vectorR(N); ll cut=0; rep(i,N){ cin>>S[i]>>R[i]; bool wa=false; rep(j,M){ if(j>=4){ break; } if(S[i][j]=='x'){ wa=true; } } if(R[i] >=1200 && wa){ cut++; } } cout<