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.BufferedReader;
import java.io.InputStreamReader;
import static java.lang.Math.abs;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.HashMap;
import java.util.HashSet;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Stack;
import java.util.TreeSet;
import static java.lang.Short.parseShort;
import static  java.lang.Integer.parseInt;
import static  java.lang.Long.parseLong;
import static  java.lang.Double.parseDouble;

public class demo implements Runnable
{demo(){}
static HashSet<Integer> hs=new HashSet<Integer>();
public static void main(String strgs[])throws IOException,InterruptedException
{ Thread t=new Thread(null, new demo(),"demo", 1<<25);
t.start();
t.join();
}
public void run()
{Fastinput in=new Fastinput();
    PrintWriter pr=new PrintWriter(System.out,true);
int k,a,b;
k=in.readInt();
a=in.readInt();
b=in.readInt();
int ans=0;
ans=a/k;
ans=ans+b/k;
if((ans==0)||((a%k!=0)&&(b<k))||((b%k!=0)&&(a<k)))
    pr.println("-1");
else pr.println(ans);

}
}
class Fastinput
{ StringTokenizer st;
 BufferedReader br;
Fastinput(){br=new BufferedReader(new InputStreamReader(System.in));}
String nexttoken() throws IOException
{while(st==null||!(st.hasMoreTokens())){st=new StringTokenizer(br.readLine());}
return st.nextToken();
}
int readInt()
{try
{return parseInt(nexttoken());}
catch(Exception  e)
{return 0;}
}
double readDouble()
{try
{return parseDouble(nexttoken());}
catch(Exception  e)
{return 0;}
}

Long readLong()
 {try
{return parseLong(nexttoken());}
catch(Exception  e)
{return (long)0;}
}

String readString()
{try
{return nexttoken();}
catch(Exception  e)
{return "";}
}        
short readShort()
{try
{return parseShort(nexttoken());}
catch(Exception  e)
{return 0;}
}        
}