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