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