Today, in the year 2025, marks the 9th Pui Ching-La Salle Programming Challenge (referred to as PuiLaTiu below) ever held! PuiLaTiu was first held in 2016 and paused for a year in 2020 due to COVID restrictions (and hence the 5th PuiLaTiu was held in 2021).
Alice is fascinated because both the edition number (9) and the year (2025) of this PuiLaTiu are perfect squares. She defines an interesting PuiLaTiu as one where both the edition number and the year it is held are perfect squares. She wonders: assuming PuiLaTius will be held once every year in the future, how many PuiLaTius held in years $$$L$$$ to $$$R$$$ (inclusive) are interesting?
Alice is distracted thinking about this during the contest. As Alice's teammate, you should answer her question to keep her from being distracted.
The input consists of two integers $$$L$$$ and $$$R$$$ $$$(2021 \leq L \leq R \leq 10^9)$$$ as indicated in the statement.
Output a single integer: the number of interesting PuiLaTius in years $$$L$$$ to $$$R$$$ (inclusive).
2021 2025
1
2026 2030
0
2100 2199
1
For Sample 1, the only interesting PuiLaTiu is held in 2025 (this year)!
For Sample 2, the 10-th PuiLaTiu is held in 2026, the 11-th PuiLaTiu is held in 2027, and so on. It can be proven that there are no interesting PuiLaTius in the next 5 years.
For Sample 3, the only interesting PuiLaTiu in the 22nd century is the 100-th PuiLaTiu held in the year 2116, with $$$100 = 10^2$$$ and $$$2116 = 46^2$$$.
| Название |
|---|


