#pragma region headers #include #include #include #include #include #include // #include #include #include #include #include #include // #include #include #include // #include #include // #include // #include #pragma endregion #pragma region pre #ifndef _MSC_VER #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #endif using namespace std; using namespace std::literals; #include using namespace atcoder; using ll = long long; using pll = pair; using str = std::string; template using vec = std::vector; #define rep(i, n) for (int i = 0; i < static_cast(n); i++) #define reps(i, n, s) for (int i = static_cast(s); i < static_cast(n); i++) #define all(x) std::begin(x), std::end(x) template inline bool chmax(T& a, T b) { return ((a < b) ? (a = b, true) : (false)); } template inline bool chmin(T& a, T b) { return ((a > b) ? (a = b, true) : (false)); } int constexpr intmax = numeric_limits().max(); int constexpr intmin = numeric_limits().min(); ll constexpr llmax = numeric_limits().max(); ll constexpr llmin = numeric_limits().min(); std::ostream& operator<<(std::ostream& os, const atcoder::modint1000000007& obj) { return os << obj.val(); } std::ostream& operator<<(std::ostream& os, const atcoder::modint998244353& obj) { return os << obj.val(); } template std::ostream& operator<<(std::ostream& os, const pair& obj) { return os << "(" << obj.first << ", " << obj.second << ")"; } template void print(Args... args) { auto t = tie(args...); apply([](auto&&... args) { ((cout << args << ' '), ...); }, t); cout << '\n'; } template void prints(Args... args) { auto t = tie(args...); apply([](auto&&... args) { ((cout << args << ' '), ...); }, t); cout << ' '; } template void printv(const T& container, int width = 3) { for (auto it = container.begin(); it != container.end(); ++it) { cout << setw(width - 1) << *it << " "; } cout << endl; } template void printv2(const T& container, int width = 3) { for (auto it = container.begin(); it != container.end(); ++it) { for (auto it2 = it->begin(); it2 != it->end(); ++it2) { cout << setw(width - 1) << *it2 << " "; } cout << endl; } } template void printv3(const T& container, int width = 3) { for (auto it = container.begin(); it != container.end(); ++it) { for (auto it2 = it->begin(); it2 != it->end(); ++it2) { for (auto it3 = it->begin(); it3 != it->end(); ++it3) { cout << setw(width - 1) << *it3 << " "; } cout << endl; } cout << endl << endl; } } template std::vector create_vec(const T& value, size_t size) { return std::vector(size, value); } template auto create_vec(const T& value, size_t first, Dims... dims) { return std::vector(value, dims...))>(first, create_vec(value, dims...)); } void yesno(bool cond) { cout << (cond ? "Yes" : "No") << endl; } void init_io() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); cout << std::setprecision(24); } #pragma endregion #include std::random_device seed_gen; std::mt19937 engine(seed_gen()); ll getRandom(ll min, ll max) { // [min ... max] std::uniform_int_distribution dist(min, max); return dist(engine); } class Solution { public: using mint = modint998244353; // using mint = atcoder::modint1000000007; void run() { int n, m; cin >> n >> m; int ans = 0; rep(i, n) { str s; int r; cin >> s >> r; if (s.substr(0, 4) != "oooo" && r >= 1200) { ++ans; } } print(ans); } }; int main() { init_io(); Solution().run(); return 0; }