import java.util.Scanner; public class testC { public static void main(String[] args){ Scanner sc=new Scanner(System.in); //ここから処理開始 int L = sc.nextInt(); //100yen int M = sc.nextInt(); //25yen int N = sc.nextInt(); //1yen while (N >= 25) { M++; N -= 25; } while (M >= 4) { L++; M -= 4; } while (L >= 10) { L-=10; } System.out.println(L + M + N); //ここまで sc.close(); } }