input1 = input()
loop = int(input1)

answer = 0
for count in range(0, loop):

    count = 0
    User_Solution = list(map(int, input().split()))

    for check in User_Solution:
        if check == 1 :
            count += 1
    if count > 1 :
            answer += 1

print(answer)