#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int N, M; cin >> N >> M; int ans = 0; rep(t, 0, N) { string S; int R; cin >> S >> R; if (R >= 1200) { if (S.substr(0, 4) != "oooo") ++ans; } } cout << ans << '\n'; }