Problems
Superstitious Santa Claus
Superstitious Santa Claus
\includegraphics{https://static.e-olymp.com/content/3d/3d636ead7c437cf604ad4a1457c75d617b69d5cd.gif}
How ‘s you know in different years interchange and different Santa Clauses transport the presents. But all of they are superstitious and transport presents all the year, except that days, when "Friday, 13" on the calendar of Santa Claus.
How many days Santa Claus wasn’t transport the presents during his duty?
\InputFile
In the first line, the number \textbf{K} is the Santa Claus’s quantity shifts of duty.
Next in \textbf{K} lines through the gaps you can see years \textbf{A} and \textbf{B}, which hit on shifts.
\textbf{1920} ≤ \textbf{A} ≤ \textbf{B} ≤ \textbf{2050} (on the Gregorian calendar).
\OutputFile
One number is the quantity days, when Santa Claus will not transport the presents.
Input example #1
2 1999 2000 1991 1997
Output example #1
13