def Main(): x,y,z=map(int,input().split()) g=min(x,y) ans=g k=x+y-2*g if k<=z: ans+=(k+z)//2 else: ans+=z print(ans) Main()