#include #include #include #include using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) #define P(x) cout << (x) << "\n" #define D(x) cerr << (x) << "\n" #define fcout cout << fixed << setprecision(18) using i64 = long long int; // 10^18 i64 r, g, b; bool isOK(i64 n) { vector v({r - n, g - n, b - n}); i64 c = 0; for(auto i:v){ c += (i>0)?i/2:i; } return c>=0; } i64 binary_search() { i64 ng = 0; i64 ok = pow(2, 24); while (abs(ok - ng) > 1) { i64 mid = ng + (ok - ng) / 2; if (!isOK(mid)) ok = mid; else ng = mid; } return ng; } int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> r >> g >> b; P(binary_search()); return 0; }