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