x, y, d = map(int, input().split()) ans = 0 for i in range(x + 1): for j in range(y + 1): if d == i + j: ans += 1 print(ans)