#include using namespace std; int main() { int l, m, n; cin >> l >> m >> n; int sum = l*100 + m*25 + n; int ans = 0; sum %= 1000; ans += sum / 100; sum %= 100; ans += sum / 25; ans += sum % 25; cout << ans << endl; }