import java.util.Scanner; public class No_103 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int d = sc.nextInt(); int count = 0; if (x + y < d) { System.out.println(count); return; } if (x + y == d) { System.out.println(1); return; } int tx = 0; int ty = 0; count = d + 1; if (x < d) count -= (d - x); if (y < d) count -= (d - y); System.out.println(count); } }