import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { int L = scan.nextInt(); int M = scan.nextInt(); int N = scan.nextInt(); int divN = N / 25; int remN = N % 25; int divM = (M+divN) / 4; int remM = (M+divN) % 4; int remL = (L+divM) % 10; int ans = remN + remM + remL; System.out.println(ans); } } }