#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; a[1] -= c; a[2] -= c * 3; int d = a[1] / 3; ans += d; a[1] -= d * 3; a[2] -= d * 3; ans += a[2] / 5; cout << ans << endl; return 0; }