x, y, z = map(int, input().split()) if min(x, y) + z < max(x, y): ans = (min(x, y) + z) else: ans = (x + y + z) // 2 print(ans)