#include #define int long long using namespace std; signed main() { int X, Y, Z; cin >> X >> Y >> Z; int ans = 0; if( abs( X-Y ) <= Z ){ Z -= abs( X-Y ); ans += max(X, Y); ans += Z/2; cout << ans << endl; }else{ cout << min(X+Z, Y+Z) << endl; } }