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