#include using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int N, M; cin >> N >> M; int ans = 0; while(N--) { string S; int R; cin >> S >> R; bool f = false; for(int i = 0; i < 4; i++) if(S[i] == 'x') f = true; if(f && R >= 1200) ans++; } cout << ans << '\n'; }