#include int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int N, M; std::cin >> N >> M; int ans = 0; for (;N--;) { std::string S; int R; std::cin >> S >> R; ans += (R >= 1200 && S.substr(0, 4) != "oooo"); } std::cout << ans << '\n'; }