没啥营养

n = int(input())
count = 0
for  i in range(1,n+1):
    a = list(map(int,input().split()))
    if(sum( a)/len(a))<60:
        count+=1
print(count)