import java.util.Scanner; public class No32 { public static void main(String[] args) { int[] coins = { 1000, 100, 25, 1 }; Scanner sc = new Scanner(System.in); int sum = 0; for (int i = 1; i <= 3; i++) { sum += sc.nextInt() * coins[i]; } int[] coinsCnt = new int[4]; for (int i = 0; i < coins.length; i++) { coinsCnt[i] = sum / coins[i]; sum -= coins[i] * coinsCnt[i]; } int result = 0; for (int i = 1; i <= 3; i++) { result += coinsCnt[i]; } System.out.println(result); sc.close(); } }