import java.util.Scanner;
class Main{
  public static void main(String args[]){
	Scanner scanner=new Scanner(System.in).useDelimiter("\\s");
	int maxAmountofA=scanner.nextInt();
    int currentAmountofA=scanner.nextInt();
    int currentAmountofB=scanner.nextInt();
    if(maxAmountofA-currentAmountofA>=currentAmountofB){
    	System.out.println(0); 
    }else{
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    }
	//int maxAmountOfA=
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String args[]){
	Scanner scanner=new Scanner(System.in).useDelimiter("\\s");
	int maxAmountofA=scanner.nextInt();
    int currentAmountofA=scanner.nextInt();
    int currentAmountofB=scanner.nextInt();
    if(maxAmountofA-currentAmountofA>=currentAmountofB){
    	System.out.println(0); 
    }else{
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    }
	//int maxAmountOfA=
  }
} Main public static void main(String args[]){
	Scanner scanner=new Scanner(System.in).useDelimiter("\\s");
	int maxAmountofA=scanner.nextInt();
    int currentAmountofA=scanner.nextInt();
    int currentAmountofB=scanner.nextInt();
    if(maxAmountofA-currentAmountofA>=currentAmountofB){
    	System.out.println(0); 
    }else{
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    }
	//int maxAmountOfA=
  } main {
	Scanner scanner=new Scanner(System.in).useDelimiter("\\s");
	int maxAmountofA=scanner.nextInt();
    int currentAmountofA=scanner.nextInt();
    int currentAmountofB=scanner.nextInt();
    if(maxAmountofA-currentAmountofA>=currentAmountofB){
    	System.out.println(0); 
    }else{
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    }
	//int maxAmountOfA=
  } Scanner scanner=new Scanner(System.in).useDelimiter("\\s"); scanner new Scanner(System.in).useDelimiter("\\s") new Scanner(System.in).useDelimiter new Scanner(System.in) "\\s" int maxAmountofA=scanner.nextInt(); maxAmountofA scanner.nextInt() scanner.nextInt scanner int currentAmountofA=scanner.nextInt(); currentAmountofA scanner.nextInt() scanner.nextInt scanner int currentAmountofB=scanner.nextInt(); currentAmountofB scanner.nextInt() scanner.nextInt scanner if(maxAmountofA-currentAmountofA>=currentAmountofB){
    	System.out.println(0); 
    }else{
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    } maxAmountofA-currentAmountofA>=currentAmountofB maxAmountofA-currentAmountofA maxAmountofA currentAmountofA currentAmountofB {
    	System.out.println(0); 
    } System.out.println(0) System.out.println System.out System System.out 0 {
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    } currentAmountofB-=(maxAmountofA-currentAmountofA) currentAmountofB (maxAmountofA-currentAmountofA) maxAmountofA currentAmountofA System.out.println(currentAmountofB) System.out.println System.out System System.out currentAmountofB String args[] args
import java.util.Scanner;
class Main{
  public static void main(String args[]){
	Scanner scanner=new Scanner(System.in).useDelimiter("\\s");
	int maxAmountofA=scanner.nextInt();
    int currentAmountofA=scanner.nextInt();
    int currentAmountofB=scanner.nextInt();
    if(maxAmountofA-currentAmountofA>=currentAmountofB){
    	System.out.println(0); 
    }else{
    	currentAmountofB-=(maxAmountofA-currentAmountofA);
      	System.out.println(currentAmountofB);
    }
	//int maxAmountOfA=
  }
}