x,y,d = map(int, input().split()) val = (d+1) - max(d-x,0) - max(d-y,0) print(max(val,0))