Description:

So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown in the figure (all blocks are square and are numbered from bottom to top, blocks in the same row are numbered from left to right). Let us describe the hopscotch with numbers that denote the number of squares in the row, staring from the lowest one: 1-1-2-1-2-1-2-(1-2)..., where then the period is repeated (1-2).

 

The coordinate system is defined as shown in the figure. Side of all the squares are equal and have length a.

Maria is a very smart and clever girl, and she is concerned with quite serious issues: if she throws a stone into a point with coordinates (x, y), then will she hit some square? If the answer is positive, you are also required to determine the number of the square.

It is believed that the stone has fallen into the square if it is located strictly inside it. In other words a stone that has fallen on the square border is not considered a to hit a square.

Input

The only input line contains three integers: axy, where a (1 ≤ a ≤ 100) is the side of the square, x and y ( - 106 ≤ x ≤ 106, 0 ≤ y ≤ 106) are coordinates of the stone.

Output

Print the number of the square, inside which the stone fell. If the stone is on a border of some stone or outside the court, print "-1" without the quotes.

Examples

Input

1 0 0

Output

-1

Input

3 1 1

Output

1

Input

3 0 10

Output

5

Input

3 0 7

Output

-1

Input

3 4 0

Output

-1

题意:

跳房子的游戏,五层一个循环,判断最后落到哪个房子里。

模拟水题,注意判断条件就行。

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<math.h>
using namespace std;
typedef long long ll;
#define inf 0x3f3f3f3f
using namespace std;
int i,j,k,l;
int ans;
int dis[1010];
int n,m,x,y,c,a,b;
bool flag;
#define maxn 1005
struct Point
{
long long x,y;
} point[maxn];

long double cost[maxn][maxn];
int vis[maxn];

long double lowc[maxn];

double dist(Point &a,Point &b)
{
Point p;
p.x=a.x-b.x;
p.y=a.y-b.y;
return sqrt(p.x*p.x+p.y*p.y);
}

double prim()
{
int i,j,p;
long double minc,res=0;
memset(vis, 0, sizeof(vis));
vis[0]=1;
for (i=1; i<n; i++)
lowc[i]=cost[0][i];
for (i=1; i<n; i++)
{
minc=inf;
p=-1;
for (j=0; j<n; j++)
if (0==vis[j]&&minc>lowc[j])
{
minc=lowc[j];
p=j;
}
if (inf==minc)
return -1;
res+=minc;
vis[p]=1;
for (j=0; j<n; j++)
if (0==vis[j]&&lowc[j]>cost[p][j])
lowc[j]=cost[p][j];
}
return res;
}

int main()
{
scanf("%d %d",&n,&m);
for (int i=0; i<n; i++)
scanf("%lld %lld",&point[i].x,&point[i].y);
for (int i=0; i<n; i++)
for (int j=i+1; j<n; j++)
cost[i][j]=cost[j][i]=dist(point[i],point[j]);
for (int i=0; i<m; i++)
{
int a,b;
scanf("%d %d",&a,&b);
a--;
b--;
cost[a][b]=cost[b][a]=0;
}
printf("%.2f\n",prim());
return 0;
}