#include using namespace std; int main() { int one, quarter, hundred, thousand = 0; cin >> hundred >> quarter >> one; while (one >= 25) { quarter++; one -= 25; } while (quarter >= 4) { hundred++; quarter -= 4; } while (hundred >= 10) { thousand++; hundred -= 10; } //cout << thousand << " " << hundred << " " << quarter << " " << one << endl; cout << one + quarter + hundred << endl; }