package yukicoder; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int total = 0; int l = sc.nextInt(); int m = sc.nextInt(); int n = sc.nextInt(); int subTotal1=0; int subTotal25=0; int subTotal100=0; int mod; mod = n % 1000; subTotal100 += mod / 100; mod %= 100; subTotal25 += mod / 25; mod %= 25; subTotal1 += mod; mod = m % 40; subTotal100 += mod / 4; mod = m % 4; subTotal25 += mod; subTotal100 += l % 10; total += subTotal1; subTotal100 += subTotal25 / 4; total += subTotal25 % 4; total += subTotal100 % 10; System.out.println(total); } }