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