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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.InputMismatchException;

public class Main {
	static long mod=(long)(1e9+7);
	static long mod1=(long)(1e9+6);
	static ArrayList<Integer> al[];
	static double x,y;
	static boolean vis[];
	static int[] dfsin,dfsout,A,level,color,a;
	static int time,block,ans;
	static int[] data;
	static long m,n1;
	public static void main(String args[]) throws IOException{
		new Thread(null,new Runnable(){
			public void run(){
				new Main().run();
			}
		},"1",1<<23).start();

	}

	protected void run() {
		// TODO Auto-generated method stub
		InputReader in 		= new InputReader(System.in);
		OutputWriter out	=	new OutputWriter(System.out);
		long k=in.readInt();
		long a=in.readInt();
		long b=in.readInt();
		long ans=0;
		ans+=a/k+b/k;
		if(ans==0  ||(a%k!=0 && b<k) || (b%k!=0 && a<k))
			out.printLine(-1);
		else
			out.printLine(ans);
		out.flush();
		out.close();
	}


	private void dfs(int cur, int par) {
		// TODO Auto-generated method stub
		dfsin[cur]=time;
		A[time++]=color[cur];
		//		System.out.println(al[cur]+" "+cur+" "+par);
		for(int next:al[cur]){
			if(next!=par){
				dfs(next,cur);
			}
		}

		dfsout[cur]=time;
		A[time++]=color[cur];
	}

	private long gcd(long r, long l) {
		// TODO Auto-generated method stub
		if(r%l==0)
			return l;
		if(l%r==0)
			return r;
		long max=Math.max(r, l);
		long min=Math.min(r, l);
		return gcd(min,max%min);
	}


	private long inv(long l) {
		// TODO Auto-generated method stub
		return pow(l,mod-2,mod);
	}

	public static long pow(long n,long p,long m)
	{
		long  result = 1;
		if(p==0)
			return 1;
		if (p==1)
			return n;
		while(p!=0)
		{
			if(p%2==1)
				result *= n;
			if(result>=m)
				result%=m;
			p >>=1;
		n*=n;
		if(n>=m)
			n%=m;
		}
		return result;
	}


	class Queries implements Comparable<Queries>{

		int left,right,x,k;
		public Queries(int i, int j, int x2, int k2) {
			// TODO Auto-generated constructor stub
			left=i;
			right=j;
			x=x2;
			k=k2;
		}
		@Override
		public int compareTo(Queries o) {
			// TODO Auto-generated method stub
			if(this.left/block==o.left/block){
				return Integer.compare(this.right, o.right);
			}
			return Integer.compare(this.left, o.left);
		}

	}
}



class node implements Comparable<node>{
	public node(int i, int j,String s) {
		x=i;
		depth=j;
		str=s;
	}

	int x;int depth;
	String str;
	@Override
	public int compareTo(node o) {
		return Integer.compare(o.depth, depth);
	}

	public int hashCode(){
		return (int)x*31+depth*17;
	}
	public boolean equals(Object o){
		node od=(node)o;
		return depth==od.depth && od.x==x;
	}
}


class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public String next() {
		return readString();
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

	public void flush() {
		writer.flush();
	}

}

class IOUtils {

	public static int[] readIntArray(InputReader in, int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++)
			array[i] = in.readInt();
		return array;
	}

} 