x, y, d = map(int, input().split()) if d > x + y: print(0) else: tmp = 0 if min(x, y) < d: tmp = min(x, y) print(d+1-tmp)