#include #define all(vec) vec.begin(), vec.end() using namespace std; using ll = long long; using P = pair; constexpr ll INF = (1LL << 30) - 1LL; constexpr ll LINF = (1LL << 60) - 1LL; constexpr ll MOD = 1e9 + 7; template void chmin(T &a, T b) { a = min(a, b); } template void chmax(T &a, T b) { a = max(a, b); } int main() { cin.tie(0); ios::sync_with_stdio(false); int x, y, z; cin >> x >> y >> z; int res = 0; int t = min(x, y); res += t; x -= t; y -= t; res += min(max(x, y), z); z -= min(max(x, y), z); res += z / 2; cout << res << endl; }