Kotsuki the Cat, together with FuuFuu and Pico, lives in the KFP apartment. As a teacher, Kotsuki needs to go to school every day to give lessons. One day, Kotsuki gives a math lesson to some grade 2 students in primary school, covering the following topics:
After class, Kotsuki assigns homework to the students:
Can you solve this grade 2 homework?
The first line contains two integers $$$x$$$ ($$$1 \le x \le 10^6$$$) and $$$n$$$ ($$$1 \le n \le 10^5$$$), where $$$n$$$ indicates the number of intervals.
Each of the following $$$n$$$ lines contains two integers $$$l$$$ and $$$r$$$ ($$$1 \le l \le r \le 10^{12}$$$), indicating an interval $$$[l,r]$$$.
For each interval, output the answer in a single line.
15 2 1 4 11 4514
2 2252
When $$$x=15$$$,
So the answer to interval $$$[1,4]$$$ is $$$2$$$.
| Name |
|---|


