#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) typedef long long ll; int main(){ int rgb[3]; FOR (i,0,3) cin >> rgb[i]; sort(rgb, rgb + 3); int ans = rgb[0]; FOR (i,0,3) rgb[i] -= ans; while (rgb[0] + rgb[1] + rgb[2] >= 5) { int need = 0; FOR (i,0,3) if(rgb[i] == 0) need++; if(need == 2) { rgb[2] -= 5; } else if (need == 1) { rgb[2] -= 3; rgb[1] -= 1; } ans++; sort(rgb, rgb + 3); } cout << ans << endl; return 0; }