#include #define rep(i,n) for(int i=0;i> x >> y >> z; int ans=0; rep(i,z+1){ int a=x+i; int b=y+(z-i); ans=max(ans,min(a,b)); } cout << ans << endl; }