시간 제한메모리 제한제출정답맞은 사람정답 비율
2 초 512 MB44403990.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.

예제 입력 1

3
1 2
2 3
4 6

예제 출력 1

7

예제 입력 2

1
0 0

예제 출력 2

0

예제 입력 3

4
-2 3
1 4
5 2
4 -2

예제 출력 3

15