Execution time limit is 1 second

Runtime memory usage limit is 128 megabytes

In the galaxy of "Milky Way" on the planet "Neptune" there are $n$ cities, some of them are connected by roads. Emperor "Maximus" of Galaxy "Milky Way" has decided to make an inventory of roads on the planet "Neptune". But as it turned out he was not good at math, so he asks you to count the number of roads.

The first line contains the number $n(0≤n≤100)$. Each of the next $n$ lines contains $n$ numbers, each of which is one or zero. Moreover, if the position $(i,j)$ of square matrix is one, then the $i$-th and $j$-th city are connected by road, and if zero, it is not connected.

Print the number of roads on "Neptune" planet.

Input #1

Answer #1