a,b,c=map(int,input().split()) ans=0 ans+=min(a,b) a-=ans;b-=ans if max(a,b)<=c:ans+=(max(a,b)+c)//2 else:ans+=c//2 print(ans)