Misha and Vanya have played several table tennis sets. Each set consists of several serves, each serve is won by one of the players, he receives one point and the loser receives nothing. Once one of the players scores exactly k points, the score is reset and a new set begins.

Across all the sets Misha scored a points in total, and Vanya scored b points. Given this information, determine the maximum number of sets they could have played, or that the situation is impossible.

Note that the game consisted of several complete sets.

Input

The first line contains three space-separated integers k, a and b (1 ≤ k ≤ 109, 0 ≤ a, b ≤ 109, a + b > 0).

Output

If the situation is impossible, print a single number -1. Otherwise, print the maximum possible number of sets.

Examples

Input

11 11 5


Output

1


Input

11 2 3


Output

-1

Note

Note that the rules of the game in this problem differ from the real table tennis game, for example, the rule of "balance" (the winning player has to be at least two points ahead to win a set) has no power within the present problem.
import java.io.*;
import java.util.*;
import java.math.*;
import java.util.Scanner;
import java.util.StringTokenizer;
 
public class M
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
 
        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public String readLine() throws IOException
        {
            byte[] buf = new byte[1024]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
 
        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
 
            if (neg)
                return -ret;
            return ret;
        }
 
        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
 
        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
 
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
 
            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
 
            if (neg)
                return -ret;
            return ret;
        }
 
        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
 
        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
 
        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
		
		public String next() throws IOException
		{
			return readLine();
		}
    }
	
	static int root(int arr[] , int x)
	{
		while(arr[x] != x)
		{
			arr[x] = arr[arr[x]];
			x  = arr[x];
		}
		return x;
	}
	
	static void union_find(int arr[] , int size[] , int x , int y)
	{
		int root_x = root(arr , x);
		int root_y = root(arr , y);
		
		if(root_x != root_y)
		{
			if(size[root_x] > size[root_y])
			{
				arr[root_y] = arr[root_x];
				size[root_x] += size[root_y];
			}
			else
			{
				arr[root_x] = arr[root_y];
				size[root_y] += size[root_x];
			}
		}
	}
 
    public static void main(String[] args) throws IOException
    {
        Scanner In = new Scanner(System.in);
		
		int a = In.nextInt();
		int b = In.nextInt();
		int c = In.nextInt();
				
		int ans = 0;
		
		if(b < a && c < a)
			System.out.println("-1");
		else
		{
			/*int max = Math.max(b,c);
			
			while(max >= a)
			{
				if(b == max)
				{
					b -= a;
				}
				else if(c == max)
				{
					c -= a;
				}
				max = Math.max(b,c);
				ans++;
			}*/
			
			if(b%a <= (c/a)*(a-1) && c%a <= (b/a)*(a-1))
				System.out.println(b/a + c/a);
			else
			System.out.println("-1");

		}
    }
}