#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; static const double EPS = 1e-8; static const double PI = 4.0 * atan(1.0); static const double PI2 = 8.0 * atan(1.0); typedef long long ll; typedef unsigned long long ull; #define ALL(c) (c).begin(), (c).end() #define CLEAR(v) memset(v,0,sizeof(v)) #define MP(a,b) make_pair((a),(b)) #define REP(i,n) for(int i=0;i<(int)n;++i) #define ABS(a) ((a)>0?(a):-(a)) template T MIN(const T& a, const T& b) { return a < b ? a : b; } template T MAX(const T& a, const T& b) { return a > b ? a : b; } template void MIN_UPDATE(T& a, const T& b) { if (a > b) a = b; } template void MAX_UPDATE(T& a, const T& b) { if (a < b) a = b; } int main() { std::ios::sync_with_stdio(false); int R, G, B; cin >> R >> G >> B; int answer = 0; while (R + G + B > 2) { if (R && G && B) { int add = MIN(R, MIN(G, B)); answer += add; R -= add; G -= add; B -= add; } else { if (R < G) { swap(R, G); } if (G < B) { swap(G, B); } if (R < G) { swap(R, G); } R -= 2; B += 1; } } cout << answer << endl; }