#include #include #include #include using namespace std; int main(int argc, char *argv[]) { string s; int r, g, b; getline(cin, s); stringstream ss(s); ss >> r >> g >> b; int ans = min(r, min(g, b)); int a[3] = { r - ans, g - ans, b - ans }; sort(a, a + 3); int c = min(a[1], (a[2] - a[1]) / 2); ans += c; ans += (a[2] - c * 3) / 5; cout << ans << endl; return 0; }