班级人数好像没啥用,直接算不合格的人就得了

n=int(input())
x=0
while True:
    try:
        a,b,c=[int(x) for x in input().split()]
        if sum([a,b,c])/3 < 60:
            x+=1
    except:
        break
print(x)