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