Superstitious Santa Claus#31

Superstitious Santa Claus

1 second
64 megabytes
Very easy

As is known, in different years, different Saint Nicholases are on duty and deliver presents. However, all of them are superstitious—they deliver presents throughout the year, except on days when their calendar marks Friday the 13th.

How many days did Saint Nicholas not deliver presents during his duty shifts?

Input

The first line contains an integer — the number of duty shifts of Saint Nicholas.

Each of the following lines contains two integers and (1920 \leq a \leq b \leq 2050; according to the Gregorian calendar), denoting the range of years for each duty shift.

Output

Output a single integer — the number of days on which Saint Nicholas did not deliver presents.

Examples

Example 1

Loading
Loading