#include using namespace std; signed main(){ int c100, c25, c1; cin >> c100 >> c25 >> c1; c25 += c1 / 25, c1 %= 25; c100 += c25 / 4, c25 %= 4; int c1000 = c100 / 10; c100 %= 10; cout << c1 + c25 + c100 << endl; return 0; }