#include using namespace std; int main() { int L,M,N; cin >> L >> M >> N; M += N / 25; L += M / 4; cout << L / 10 + L % 10 + M % 4 + N % 25 << "\n"; return 0; }