import math as m a, b, c = map(int, input().split()) if c: if a>b+c or b>a+c: print(min([b+c,a+c])) else: print(m.floor((a + b + c) / 2)) else: print(min([a, b]))