#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main(){ ll r, g, b, ans = 0; cin >> r >> g >> b; vector l = {r, g, b}; sort(l.begin(), l.end()); while ((l[0] != 0 && l[1] != 0 && l[2] != 0) || l[2] >= 3){ ll t; sort(l.begin(), l.end()); if (l[2] >= 3){ l[0] += (l[2] - l[1])/2; l[2] -= (l[2] - l[1])/2*2; } t = *min_element(l.begin(), l.end()); ans += t; l[0] -= t; l[1] -= t; l[2] -= t; if (l[0] == 0){ t = l[1]/2; ans += t; l[1] -= t*2; l[2] -= t*2; } } cout << ans << endl; }