import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L =sc.nextInt(); int M =sc.nextInt(); int N =sc.nextInt(); int O =0; do{ if((L/25)==0){ M=M+1; L=L-25; } if((M/4)==0){ N=N+1; M=M-4; } if((N/10)==0){ O=O+1; N=N-10; } System.out.println(L+M+N+O); }while((N/10)==0); sc.close(); } }