import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String... args) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { int[] a = reader.lines().limit(3).mapToInt(Integer::parseInt).toArray(); int sum = (100 * a[0] + 25 * a[1] + a[2]) % 1000; int count = sum / 100; sum %= 100; count += sum / 25; System.out.println(count + sum % 25); } } }