x, y, z = map(int, input().split()) print(min(x + z, y + z, (x + y + z) // 2))