X,Y,Z=(int(i) for i in input().split()) a=min(X,Y) a+=min(Z,(abs(X-Y)+Z)//2) print(a)