#include using namespace std; typedef long long ll; // Welcome to my source code! int main() { int x, y, z; cin >> x >> y >> z; int ans; if (max(x, y) - min(x, y) <= z) ans = max(x, y) + (z - (max(x, y) - min(x, y))) / 2; else ans = min(x, y) + z; cout << ans << endl; }