import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int L = scanner.nextInt(); int M = scanner.nextInt(); int N = scanner.nextInt(); int sum = 0; int ans = 0; sum = 100 * L + 25 * M + N; sum = sum % 1000; ans += sum / 100; sum %= 100; ans += sum / 25; sum %= 25; ans += sum; System.out.println(ans); scanner.close(); } }