#abc073b. [abc073_b]Theater

[abc073_b]Theater

Problem Statement

Joisino is working as a receptionist at a theater.

The theater has 100000100000 seats, numbered from 11 to 100000100000.

According to her memo, NN groups of audiences have come so far, and the ii-th group occupies the consecutive seats from Seat lil_i to Seat rir_i (inclusive).

How many people are sitting at the theater now?

Constraints

  • 1N10001≤N≤1000
  • 1liri1000001≤l_i≤r_i≤100000
  • No seat is occupied by more than one person.
  • All input values are integers.

Input

Input is given from Standard Input in the following format:

NN l1l_1 r1r_1 :: lNl_N rNr_N

Output

Print the number of people sitting at the theater.


Sample Input 1

1
24 30

Sample Output 1

7

There are 77 people, sitting at Seat 24,25,26,27,28,2924,25,26,27,28,29 and 3030.


Sample Input 2

2
6 8
3 3

Sample Output 2

4