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 add_M = (int)N/25; int lost_N = N - add_M*25; M = M + add_M; int add_L = (int)M/4; int lost_M = M - add_L*4; L = L + add_L; int add_O = (int)L/10; int lost_L = L - add_O*10; System.out.println(lost_N+lost_M+lost_L); } }