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