In the galaxy of "Milky Way" on the planet "Neptune" there are 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 . Each of the next lines contains numbers, each of which is one or zero. Moreover, if the position of square matrix is one, then the -th and -th city are connected by road, and if zero, it is not connected.
Print the number of roads on "Neptune" planet.