#include using namespace std; using int64 = long long; using i64 = int64; #define rep(i,N) for(int i=0;i<(int)(N); ++i) const int inf = 1 << 30; const int64 inf64 = 1ll << 60; double dp[301][301][301]; int main() { int x, y, z; cin >> x >> y >> z; int ans = min(x, y); int n= min(x, y); x -= n; y -= n; if(x > y) swap(x, y); if(y <= z) { ans += y; z -= y; } else { cout << ans + x << endl; return 0; } ans += z / 2; cout << ans << endl; }