#include using namespace std; int main() { vector c(3); cin >> c[0] >> c[1] >> c[2]; sort(c.begin(), c.end()); int cnt = 0; while (c[0] >= 1) { c[0]--; c[1]--; c[2]--; cnt++; } while (c[1] >= 1 && c[2] >= 3) { c[1] -= 1; c[2] -= 3; cnt++; if (c[1] > c[2]) swap(c[1], c[2]); } while (c[2] >= 5) { c[2] -= 5; cnt++; } cout << cnt << endl; return 0; }