n = int(input())
result = c(n)
print(result)
в тело функции. Надо: def c(n):
f=0
for i in range(n):
a,b,c=map(int,input().split())
if a+b+c>=2:
f+=1
return f
n = int(input())
result = c(n)
print(result)
f=0
for i in range(n):
a,b,c=map(int,input().split())
if a+b+c>=2:
f+=1
return f
n = int(input())
result = c(n)
print(result)