#P9859. Pennies in the Ring

    ID: 23004 Type: Default 1000ms 256MiB

Pennies in the Ring

Pennies in the Ring

The game “Pennies in the Ring” is played on a grid where a circle is drawn with its center at \((0,0)\). A penny is placed on every integer coordinate \((x, y)\) that satisfies the inequality \(x^2 + y^2 \leq r^2\). Given the radius \(r\) of the circle, your task is to compute the total number of pennies placed on the grid such that every point within or on the circle is covered.

inputFormat

The input consists of a single integer r (\(r\ge0\)), which represents the radius of the circle.

outputFormat

Output a single integer representing the total number of pennies (grid points) that lie within or on the circle described by \(x^2 + y^2 \leq r^2\).

sample

0
1