import java.util.Scanner; public class Yukicoder { 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 sum = 0; M += N / 25; sum += N % 25; L += M / 4; sum += M % 4; sum += L % 10; System.out.println(sum); } }