def team(list_of_problems):
count = 0
for slist in list_of_problems:
if slist[0] == 1 and slist[1] or slist[1] == 1 and slist[2] or slist[0] == 1 and slist[2]:
count= count + 1
return count
if __name__ == '__main__':
word = int(input())
list_of_problems = []
for _ in range(0,word):
list_of_problems.append(list(map(int,input().split())))
print(team(list_of_problems))