#include using namespace std; namespace { typedef double real; typedef long long ll; template ostream& operator<<(ostream& os, const vector& vs) { if (vs.empty()) return os << "[]"; auto i = vs.begin(); os << "[" << *i; for (++i; i != vs.end(); ++i) os << " " << *i; return os << "]"; } template istream& operator>>(istream& is, vector& vs) { for (auto it = vs.begin(); it != vs.end(); it++) is >> *it; return is; } int R, G, B; void input() { cin >> R >> G >> B; } bool C(int x) { int a[] = {R - x, G - x, B - x}; int d = 0, r= 0; for (int i = 0; i < 3; i++) { if (a[i] >= 0) { r += a[i] / 2; } else { d += -a[i]; } } return r >= d; } void solve() { int lb = 0, ub = 1e7 + 5; while (lb + 1 < ub) { int mid = (lb + ub) / 2; (C(mid) ? lb : ub) = mid; } cout << lb << endl; } } int main() { input(); solve(); return 0; }