Problem C
Gatnamót
Languages
en
is
The police in Squareland is chasing criminals. The crime was commited at an intersection at the coordinates $(0, 0)$ and the police has received an anonymous tip on the criminals’ location. The tip was that the criminals are situated at some intersection within $r$ kilometers from the crime scene. Here these $r$ kilometers refer to Euclidean distance despite Squareland being reminiscent of Manhattan. In squareland there are intersections every one kilometer to the north, south, east and west from every other intersection. How many intersections does the police need to search to be sure they’ll catch the criminals? The criminals will never change position.
Input
A single integer $r$.
Úttak
A single line with one integer, the number of intersections the police need to search.
Scoring
Group |
Points |
Constraints |
1 |
50 |
$0 < r \leq 2000$ |
2 |
50 |
$0 < r \leq 10^6$ |
Sample Input 1 | Sample Output 1 |
---|---|
2 |
13 |
Sample Input 2 | Sample Output 2 |
---|---|
10 |
317 |
Sample Input 3 | Sample Output 3 |
---|---|
4000 |
50265329 |