x,y,z=map(int,input().split()) if x+z<=y: print(x+z) elif y+z<=x: print(y+z) else: print((x+y+z)//2)