dummy-3

Seeing all other business tycoons from Gotham attending Vibrant Gujarat 2015, Bruce Wayne felt left out and decided he too would attend the summit. He asked Alfred to arrange passes for him but was too late. The passes were all sold out. He later found out that a man named Falcone was selling passes on the black market. 

Wayne went to Falcone to get those passes but Falcone refused. It wasn't money that Falcone desired, he just wanted to have a little bit of fun. In order to earn those passes, Bruce Wayne would have to solve a given number of, say N, sudoku puzzles and tell Falcone the sum of the numbers on the main diagonals of all the puzzles in order to get those passes. 

Help Bruce solve this question so that he can get those passes from Falcone to attend this summit.

Sum = 39

Input: 
The first line of input would consist of a number N, the number of sudoku puzzles. Next Nx9 lines would contain the puzzles in the specified format.

Output:
A single number which is the sum of all the numbers on the main diagonals of all the given puzzles.

Constraints:
1 ≤ N ≤ 10

Note:
There is NO blank line between two consecutive input puzzles.

SAMPLE INPUT
1
003020600
900305001
001806400
008102900
700000008
006708200
002609500
800203009
005010300

SAMPLE OUTPUT
39

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: