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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

public class c397 {

	static class Task{		
		
		public void Solve(InputReader in, PrintWriter out)
		{
			int k=in.nextInt();
			int a=in.nextInt();
			int b=in.nextInt();
			if(possible(k, a, b))
				out.println(a/k+b/k);
			else
				out.println("-1");

			
		}
	}
	
	static boolean possible(int k,int a,int b)
	{
		if((a/k+b/k)==0)
			return false;
		if(a%k>0&b/k==0|b%k>0&a/k==0)
		{
			return false;
		}
		else
			return true;
	}

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.Solve(in,out);
        out.close();
    }
    
    static int[][] sort2D(int arr[][]){
        Arrays.sort(arr,new java.util.Comparator<int[]>(){
        public int compare(int[] a, int[] b) {
            return Integer.compare(a[0], b[0]);
        }});
        return arr;
    }
    
	static int[] di={1,0,-1,0,1,-1,-1,1};
	static int[] dj={0,1,0,-1,1,1,-1,-1};
    
	static class point{
		int x;int y;
		public point(int x,int y){
			this.x=x;
			this.y=y;
		}
	}
    
    static int abs(int x){if(x>=0)return x;else return -x;}
    static int gcd(int a,int b){return b==0?a:gcd(b,a%b);}
    static int min(int x,int y){return x<y?x:y;}
    static int min(int x,int y,int z){return x<y?(x<z?x:z):(y<z?y:z);}
    static int max(int x,int y){return x>y?x:y;}
    static int max(int x,int y,int z){return x>y?(x>z?x:z):(y>z?y:z);}
    
    static long abs(long x){if(x>=0)return x;else return -x;}
    static long gcd(long a,long b){return b==0?a:gcd(b,a%b);}
    static long min(long x,long y){return x<y?x:y;}
    static long min(long x,long y,long z){return x<y?(x<z?x:z):(y<z?y:z);}
    static long max(long x,long y){return x>y?x:y;}
    static long max(long x,long y,long z){return x>y?(x>z?x:z):(y>z?y:z);}
    
   
    static void joutArray(int arr[]){
    	for(int i=0;i<arr.length;i++){
    		System.out.print(arr[i]+" ");
    	}
    }
    
    static void joutArray(int arr[][],int n,int m){
    	for(int i=0;i<n;i++){
    		for(int j=0;j<m;j++)
    		System.out.print(arr[i][j]+" ");
    		System.out.println();
    	}
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        
        public String nextLine() {
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}

        public int nextInt() {
            return Integer.parseInt(next());
        }
        
        public long nextLong() {
        	return Long.parseLong(next());
        }
        
        public double nextDouble() {
        	return Double.parseDouble(next());
        }
        
        public int[] nextIntArray(int n) {
        	int arr[]=new int[n];
        	for(int i=0;i<n;i++)
        		arr[i]=nextInt();
        	return arr;
        }
        
        public char[] nextCharArray(){
        	char arr[]=next().toCharArray();
        	return arr;
        }
        
        public int[][] nextIntArray(int n,int m){
        	int arr[][]=new int[n][m];
        	for(int i=0;i<n;i++)
        		for(int j=0;j<m;j++)
        			arr[i][j]=nextInt();
        	return arr;
        }
     }
    
   }