#include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string using namespace std; int main() { int L, M, N; cin >> L >> M >> N; int ans = 0; M += N / 25; ans += N % 25; L += M / 4; ans += M % 4; ans += L % 10; cout << ans << endl; return 0; }