import java.io.*;
import java.util.*;
import java.math.*;

public class Main
{
	public static void main(String[] args)
	{
		try
		{
			Scanner scanner = new Scanner(new FileReader("D.in"));
			String n = scanner.next();
			String a = scanner.next();
			String b = scanner.next();
			scanner.close();
			BigInteger bigN = new BigInteger(n);
			BigInteger bigA = new BigInteger(a);
			BigInteger bigB = new BigInteger(b);
			BigInteger result = bigA.subtract(bigB);
			result = bigN.subtract(result);
			PrintWriter out = new PrintWriter(new FileWriter("D.out"));
			out.println(result.toString());
			out.close();
		}catch(Exception e){}
	}
}