import java.math.*; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y=sc.nextInt(); int d = sc.nextInt(); if(x+y=d && y>=d){ System.out.println(d+1); }else{ System.out.println(d+1-Math.max(0,d-x)-Math.max(0,d-y)); } } }