One upon a time there were three best friends Abhinav, Harsh, and Akash decided to form a 
team and take part in ICPC from KIIT. Participants are usually offered several problems during 
the programming contest. Long before the start, the friends decided that they will implement a 
problem if at least two of them are sure about the solution. Otherwise, friends won't write the 
problem's solution. 
This contest offers $N$ problems to the participants. For each problem we know, which friend is 
sure about the solution. Help the KIITians find the number of problems for which they will write a 
solution. 
Then n lines contain three integers each, each integer is either 0 or 1. If the first number in the 
line equals 1, then Abhinav is sure about the problem's solution, otherwise, he isn't sure. The 
second number shows Harsh's view on the solution, the third number shows Akash's view. The 
numbers on the lines are 

-----Input:-----
- A single integer will contain $N$, number of problems. 

-----Output:-----
Print a single integer — the number of problems the friends will implement on the contest. 

-----Constraints-----
- $1 \leq N \leq 1000$ 

-----Sample Input:-----
3

1 1 0

1 1 1

1 0 0   

-----Sample Output:-----
2  

-----EXPLANATION:-----
In the first sample, Abhinav and Harsh are sure that they know how to solve the first problem 
and all three of them know how to solve the second problem. That means that they will write 
solutions for these problems. Only Abhinav is sure about the solution for the third problem, but 
that isn't enough, so the group won't take it.

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
n = int(input())
count = 0
for _ in range(n):
	L = list(map(int, input().split()))
	if L.count(1) >= 2:
		count += 1
print(count)


count = 0
for _ in range(int(input())):
	view = list(map(int, input().split()))
	if sum(view) > 1:
		count += 1
print(count)


T = int(input())
c = 0
while T:
	l = [int(k) for k in input().split()]
	a = l.count(1)
	if a >= 2:
		c += 1
	T -= 1
print(c)


try:
	l = []
	for _ in range(int(input())):
		arr = [int(i) for i in input().split()]
		a = 0
		x = arr.count(1)
		if x >= 2:
			l.append(1)
	ans = sum(l)
	print(ans)
except EOFError as error:
	pass


a = int(input())
z = 0
for i in range(a):
	b = list(map(int, input().split()))
	y = 0
	for j in b:
		if j == 1:
			y = y + 1
	if y > 1:
		z = z + 1
print(z)


t = int(input())
sol = 0
for _ in range(t):
	a = list(map(int, input().split()))
	cnt = 0
	for i in a:
		if i == 1:
			cnt += 1
		else:
			pass
	if cnt >= 2:
		sol += 1
	else:
		pass
print(sol)


n = int(input())
surity = 0
for _ in range(n):
	a = list(map(int, input().split()))
	if sum(a) >= 2:
		surity += 1
print(surity)


t = 0
for i in range(0, int(input())):
	a = list(map(int, input().split()))
	if a.count(1) >= 2:
		t += 1
print(t)


ans = 0
for i in range(int(input())):
	if sum(list(map(int, input().split()))) >= 2:
		ans += 1
print(ans)


N = int(input())
c = 0
for _ in range(N):
	p = list(map(int, input().split()))
	s = p.count(1)
	if s >= 2:
		c += 1
print(c)


c = 0
for _ in range(int(input())):
	(lst, s) = (list(map(int, input().split())), 0)
	for i in lst:
		s += i
	if s > 1:
		c += 1
print(c)


res = 0
for _ in range(int(input())):
	x = list(map(int, input().split()))
	if x.count(1) >= 2:
		res += 1
print(res)


n = int(input())
ans = 0
for _ in range(n):
	(a, b, c) = map(int, input().split())
	if a + b + c >= 2:
		ans += 1
print(ans)


c = 0
for _ in range(int(input())):
	s = input()
	if s.count('1') >= 2:
		c = c + 1
print(c)


will_do = 0
for _ in range(int(input())):
	will_do += sum([int(x) for x in input().split()]) >= 2
print(will_do)


count = 0
n = int(input())
for i in range(n):
	p_1 = list(map(int, input().split()))
	if p_1.count(1) > 1:
		count = count + 1
print(count)


n = int(input())
s = 0
for i in range(n):
	lst = list(map(int, input().split()))
	if sum(lst) >= 2:
		s += 1
print(s)


test_case = int(input())
re = 0
for i in range(test_case):
	a = list(map(int, input().split()))
	cunt = a.count(1)
	if cunt >= 2:
		re = re + 1
print(re)


c = 0
for _ in range(int(input())):
	l = list(map(int, input().split()))
	if l.count(1) >= 2:
		c += 1
print(c)


N = int(input())
cnt = 0
for _ in range(N):
	arr = list(map(int, input().split()))
	if arr.count(1) >= 2:
		cnt += 1
print(cnt)