X,Y,Z=map(int,input().split()) if X>Y+Z: print(Y+Z) elif Y>X+Z: print(X+Z) else: print((X+Y+Z)//2)