import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int money1000YenNum = 0; int money100YenNum = Integer.parseInt(scanner.next()); int money25YenNum = Integer.parseInt(scanner.next()); int money1YenNum = Integer.parseInt(scanner.next()); money25YenNum += (money1YenNum / 25); money1YenNum -= (money1YenNum / 25); money100YenNum += (money25YenNum / 4); money25YenNum -= ((money25YenNum / 4) * 4); money1000YenNum += (money100YenNum / 10); money100YenNum -= ((money100YenNum / 10) * 10); System.out.println((money1YenNum + money25YenNum + money100YenNum)); } }