x,y,d = map(int,raw_input().split()) a = d - x if d > x else 0 b = d - y if d > y else 0 ans = d - a - b + 1 print ans if ans > 0 else 0