Team

Practice this coding question on Coding Gurukul.

Problem statement

Three teammates review each proposed project and record either 1 for confidence or 0 for uncertainty. They accept a project only when at least two teammates are confident. Count how many projects the team accepts.

Input format

First line: n. Next n lines: three binary decisions.

Output format

Print the number of accepted projects.

Constraints

1 <= n <= 1000; decisions are 0 or 1.

Sample input

3
1 0 1
1 0 0
1 1 1

Sample output

2

Sign in to run or submit a solution in C++, Java or Python.