Cities and roads
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
In the "Milky Way" galaxy, on the planet "Neptune" there are cities, some of which are connected by roads. Emperor "Maximus" of the "Milky Way" galaxy has decided to make an inventory of the roads on "Neptune". However, as it turns out, he is not very good at math, so he asks you to count the number of roads.
Input
The first line contains the number . Each of the next lines contains numbers, each either one or zero. If the position in the square matrix is one, then the -th and -th cities are connected by a road; if it is zero, they are not connected.
Output
Print the number of roads on the planet "Neptune".
Examples
Input #1
Answer #1
Submissions 12K
Acceptance rate 66%