#include using namespace std; using ll = long long; using P = pair; #define rep(i,n) for(int i=0;i> x >> y >> z; int ans = 0; if (z<=abs(x-y)) ans += min(x,y) + z; else{ ans += max(x,y); z -= abs(x-y); ans += z/2; } cout << ans << endl; return 0; }