X, Y ,D = map(int, input().split()) def Lpoint(x, y, d): if x + y < d: return 0 else: if (d <= x and y < d) or (d <= y and x < d): return (d + 1) - (d - min(x, y)) elif x < d and y < d: return (d + 1) - (d - x) - (d - y) else: return d + 1 if __name__ == "__main__": print(Lpoint(X, Y, D))