#K45182. Team Puzzle Attempts

    ID: 27697 Type: Default 1000ms 256MiB

Team Puzzle Attempts

Team Puzzle Attempts

You are given a series of puzzles. For each puzzle, three team members vote whether to attempt the puzzle or not by casting a 0 (disagree) or 1 (agree).

The team will attempt a puzzle if at least two of the members agree. In other words, if for a given puzzle the sum of the votes is at least 2:

$$a + b + c \ge 2$$

Your task is to determine the total number of puzzles the team will attempt based on the members' decisions.

inputFormat

The first line of input contains an integer n indicating the number of puzzles. Each of the following n lines contains three integers separated by spaces representing the votes of the team members for that puzzle. Each integer is either 0 or 1.

outputFormat

Output a single integer—the number of puzzles the team will attempt to solve.## sample

4
1 1 0
0 1 0
1 1 1
0 0 0
2