#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,M; cin >> N >> M; int answer = 0; while(N--){ string s; cin >> s; int r; cin >> r; if(r < 1200) continue; for(int i=0; i<4; i++) if(s.at(i) == 'x'){answer++; break;} } cout << answer << endl; }