import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt();// 100 int b = sc.nextInt();// 25 int c = sc.nextInt();// 1 int ans = (100 * a + 25 * b + c) % 1000; System.out.println(ans / 100 + ans % 100 / 25 + ans % 100 % 25); } }