import java.util.*; public class Yukicoder_32{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int L = stdIn.nextInt(); int M = stdIn.nextInt(); int N = stdIn.nextInt(); int K = 0; int count = N/25; N -= count*25; M += count; count = M/4; M -= count*4; L += count; count = L/10; L -= count*10; K = count; System.out.println(L+M+N); } }