#include using namespace std; typedef long long ll; #define P pair #define pub push_back #define pob pop_back #define mp make_pair #define nl '\n' //new line #define mset multiset #define lb lower_bound #define rep(i,n) for(ll i=0;i<(ll)(n);++i) template bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;} template bool chmax(T& a,T b){if(a>n>>m; vector s(n+1); vector r(n+1); for(int i=1;i<=n;++i){ cin>>s[i]>>r[i]; } ll ans=0; for(int i=1;i<=n;++i){ bool ok=true; for(int j=0;j<4;++j){ if(s[i][j]=='x') ok=false; } if(ok==false&&r[i]>=1200) ans++; } cout<