import java.util.*; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { Scanner s = new Scanner(System.in); int L = s.nextInt(); int M = s.nextInt(); int N =s.nextInt(); int K = 0; int S = 0; int R = 0; if(N>24){ K=N/25; N=N%25; M=M+K; } if(M>3){ S=M/4; M=M%4; L=L+S; } if(L>9){ R=L/10; L=L%10; } int sum =L+M+N; System.out.println(sum); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); } }