X,Y,Z=map(int,input().split()) print(min(min(X,Y)+Z,(X+Y+Z)//2))