Segments
RuNU is celebrating University Day, and the brightest students from Ruthenia are invited to join the festivities. Stepan wants to be on the guest list, but to do so, he must solve a challenging problem. This day is special, and the problem is both complex and unique. However, Stepan is not discouraged because he knows he can rely on your help. Can you assist Stepan and ensure he makes it to the celebration? Let's see!
The problem involves N segments, each defined by two numbers: L and R, representing the left and right boundaries of the segment, respectively. Your task is to determine how many numbers are divisible by 5 and fall within at least one of these segments.
Input
The first line contains a single integer N (1 ≤ N ≤ 10^5). The next N lines each contain two integers L and R (1 ≤ L ≤ R ≤ 10^18).
Output
Output a single number, which is the solution to the problem.