#include "bits/stdc++.h" // Begin {{{ using namespace std; #ifndef DEBUG #define dump(...) #endif template inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); } template inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); } template inline vector make_v(const T &initvalue, size_t sz) { return vector(sz, initvalue); } template inline auto make_v(const T &initvalue, size_t sz, Args... args) { return vector(initvalue, args...))>(sz, make_v(initvalue, args...)); } constexpr int INF = 0x3f3f3f3f; constexpr int64_t LINF = 0x3f3f3f3f3f3f3f3fLL; constexpr size_t operator""_sz(unsigned long long value) { return value; }; constexpr intmax_t operator""_im(unsigned long long value) { return value; }; constexpr uintmax_t operator""_um(unsigned long long value) { return value; }; // }}} End signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int x, y, z; cin >> x >> y >> z; while (z) { if (x <= y) { x++; } else { y++; } z--; } cout << min(x, y) << "\n"; return 0; }