import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    } main {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c); a!=b a b {
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        } if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0); c>(a-b) c (a-b) a b System.out.println(c-(a-b)) System.out.println System.out System System.out c-(a-b) c (a-b) a b System.out.println(0) System.out.println System.out System System.out 0 System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    }
} Main
import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a!=b){
            if (c>(a-b))
                System.out.println(c-(a-b));
            else
                System.out.println(0);
        }
        else
            System.out.println(c);
    }
}
