|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||44||40||39||90.698%|
Starting from the second semester, Mr. Eto will take classes at Kyoto University. Mr. Eto is not accustomed to the structure of the university because in the first semester he had only online lectures.
There are $N$ classes today. The schedule contains the coordinates of $N$ classrooms in the order in which they have to be visited. The coordinates of the $i$-th classroom are $(x_i, y_i)$. Assuming Mr. Eto starts the day in the first classroom, and ends in the $N$-th classroom, calculate the total distance he has to travel.
In Kyoto University campus, the distance traveled from the coordinates $(a, b)$ to the coordinates $(c, d)$ is equal to $|a-c| + |b-d|$.
The first line of the input contains one integer $N$ ($1 \le N \le 100$), the number of classrooms in today's schedule. Then $N$ lines follow, $i$-th of them containing integer coordinates $x_i$ and $y_i$ of the $i$-th classroom in the schedule ($-100 \le x_i, y_i \le 100$).
Print one integer: the total distance traveled by Mr. Eto by the end of the day.
3 1 2 2 3 4 6
1 0 0
4 -2 3 1 4 5 2 4 -2