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