#include using namespace std; int main() { ios::sync_with_stdio(false); int X, Y, Z; cin >> X >> Y >> Z; if (Y < X) swap(X, Y); int t = min(Y - X, Z); Z -= t; X += t; X += Z / 2; Y += Z / 2; cout << min(X, Y) << endl; return 0; }