import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); int d = scan.nextInt(); scan.close(); if(x >= d && y >= d) { System.out.println(d + 1); }else { int ans = d + 1 - (d - x) - (d - y); if(ans < 0) { ans = 0; } System.out.println(ans); } } }