#include using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); int x, y, z; cin >> x >> y >> z; if (x > y) swap(x, y); int tmp = min(y - x, z); z -= tmp; x += tmp; x += z / 2; y += z / 2; cout << min(x, y) << "\n"; return 0; }