import java .util.Scanner; public class Money { public static void main(String args[]) { Scanner stdIn = new Scanner(System.in); int L = stdIn.nextInt(); //100円 int M = stdIn.nextInt(); //25円 int N = stdIn.nextInt(); //1円 do { if(N >= 25) { N = N - 25; M++; } } while (N >= 25); do { if(M >= 4) { M = M - 4; L++; } } while (M >= 4); do{ if(L >= 10){ L = L - 10; } }while(L >= 10); int sum = L + M + N; System.out.println(sum); } }