#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef pair pii; typedef vector vi; #define rep(i,x) for(int i=0;i<(int)(x);++i) int main(){ int ans, min, a[3], *mn, *mx; rep(i,3) cin >> a[i]; ans = *min_element(a, a+3); rep(i,3) a[i] -= ans; while (1) { mx = max_element(a, a+3); mn = min_element(a, a+3); ++a[mn-a]; a[mx-a] -= 2; mn = min_element(a, a+3); if (*mn < 1) break; ++ans; rep(i,3) --a[i]; } cout << ans << endl; return 0; }