print(sum(1 for p in [input().split() for _ in range(int(input().split()[0]))] if int(p[1]) >= 1200 and 'x' in p[0][:4]))