<?php
$money = trim(fgets(STDIN))*100;
$money += trim(fgets(STDIN))*25;
$money += trim(fgets(STDIN))*1;

$money = $money % 1000;
$coin = floor($money / 100);
$money = $money % 100;
$coin += floor($money / 25);
$money = $money % 25;
$coin += $money;

echo $coin.PHP_EOL;