Geometrically every square has one well defined centre point. On a grid that holds only when the sides of the square span an odd number of points. Every odd number can be written as 2k+1, so a square whose sides are 2k+1 points long is said to have size k.
A pattern of squares is built with these rules.
A value of k therefore fixes one pattern. The picture below shows the pattern for k=15.

Any point of the grid is surrounded by zero or more squares. A point lying on the border of a square counts as surrounded by that square.
Read a value of k and the coordinates of a point, then report how many squares surround the point.
Each line of input holds 3 integers: k, the x coordinate of the point, and the y coordinate of the point, with 1≤k≤512 and 0≤x,y≤2048. The input ends with a line holding three zeroes, 0 0 0, which is not a query.
Print one line for every query line of the input. Each line holds the number of squares that surround the given point.