#include using namespace std; #define LOG(...) fprintf(stderr,__VA_ARGS__) //#define LOG(...) #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define REP(i,n) for(int i=0;i<(int)(n);++i) #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(),(a).rend() #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort(ALL(c)) #define RSORT(c) sort(RALL(c)) typedef long long ll; typedef unsigned long long ull; typedef vector vb; typedef vector vi; typedef vector vll; typedef vector vvb; typedef vector vvi; typedef vector vvll; typedef pair pii; typedef pair pll; int main() { int r, g, b; cin >> r >> g >> b; int res = 0; int mi = min(r, min(g, b)); r -= mi; g -= mi; b -= mi; res += mi; while (1) { int n = 0; if (r > 2) n += r/2; if (g > 2) n += g/2; if (b > 2) n += b/2; int z = (r==0)+(g==0)+(b==0); if (z > n) { break; } int ma = max(r, max(g, b)); if (r == ma) { r -= 2 * z; r--; if (g != 0) g--; if (b != 0) b--; } else if (g == ma) { g -= 2 * z; g--; if (r != 0) r--; if (b != 0) b--; } else if (b == ma) { b -= 2 * z; b--; if (r != 0) r--; if (g != 0) g--; } res++; } cout << res << endl; }