import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int a = Integer.parseInt(br.readLine()); // 100 int b = Integer.parseInt(br.readLine()); // 25 int c = Integer.parseInt(br.readLine()); // 1 int c2 = c / 25; if (c2 > 0) { b = b + c2; c = c - c2 * 25; } int b2 = b / 4; if (b2 > 0) { a = a + b2; b = b - b2 * 4; } int a2 = a / 10; if (a2 > 0) { a = a - a2 * 10; } System.out.println(a + b + c); } }