#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using Pll = pair; using Pii = pair; constexpr ll MOD = 1000000007; constexpr long double EPS = 1e-10; constexpr int dyx[4][2] = { { 0, 1}, {-1, 0}, {0,-1}, {1, 0} }; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int x, y, z; cin >> x >> y >> z; int ans = min(x, y); x -= ans; y -= ans; if(x) { ans += min(x, z); z -= min(x, z); } if(y) { ans += min(y, z); z -= min(y, z); } ans += z/2; cout << ans << endl; }