#include #define rep(i, n) for(long long i = 0; i < n; i++) #define ALL(v) (v).begin(), (v).end() using namespace std; using lint = long long; int main() { int l, m, n; cin >> l >> m >> n; m += n / 25; n %= 25; l += m / 4; m %= 4; l %= 10; cout << l + m + n << endl; }