import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int remainder = a - b; remainder a - b a b if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        } remainder == 0 remainder 0 {
            System.out.println(c);
        } System.out.println(c) System.out.println System.out System System.out c {
            System.out.println(Math.max(c - remainder, 0));
        } System.out.println(Math.max(c - remainder, 0)) System.out.println System.out System System.out Math.max(c - remainder, 0) Math.max Math c - remainder c remainder 0 sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int remainder = a - b;
        // 容器1の空き容量が0の場合、容器2の水は移動できない
        if (remainder == 0) {
            System.out.println(c);
        } else {
            System.out.println(Math.max(c - remainder, 0));
        }
        sc.close();
    }
}