import java.util.Scanner; public class Main_yukicoder131 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int d = sc.nextInt(); System.out.println(getArea(0, 0, x, y, d)); sc.close(); } private static long getArea(long x1, long y1, long x2, long y2, long d) { if (x2 + y2 == d) { return 1; } else if (x2 + y2 < d) { return 0; } if (x2 >= d && y2 >= d) { return d + 1; } if (x2 >= d) { return y2 + 1; } if (y2 >= d) { return x2 + 1; } else { return d + 1 - (d - x2) - (d - y2); } } }