X,Y,D = map(int,input().split()) N = D+1-max(D-X,0)-max(D-Y,0) print(max(N,0))