x,y,z=map(int,input().split()) ans=0 s=min(x,y) ans+=s x-=s y-=s ans+=max(x,y) z-=max(x,y) if z>1: ans+=z//2 print(ans)