Олимпиадный тренинг

Задача 22017. Cities and roads


In the "Milky Way" galaxy on the planet "Neptune" there are N cities, some of which are connected by roads. Emperor "Maximus"  "Milky Way" galaxy decided to make an inventory of the roads on the planet "Neptune". But as it turns out, he's not good at math,  so he asks you to count the number of roads.
 
Input
The first line specifies the number N (\(0<=N<=100\)). In the following N< /code> lines contain N numbers, each of which is a one or a zero. Moreover, if the position of the (i,j) square matrix is ​​one, then the i-th and j-th cities are connected by roads,  and if zero, then they are not connected. 
 
Output 
Output one number - the number of roads on the planet "Neptune".
 
Note
All roads are two-way, that is, if there is a road from the city i to the city j, then there is a road from the city j to the city i, and it's the same road.
 
Examples
# Input Output
1
5
0 1 0 0 0 
1 0 1 1 0 
0 1 0 0 0 
0 1 0 0 0 
0 0 0 0 0
3