import java.util.Scanner; public class Main{ public static void main(String args[])throws Exception{ Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int M = sc.nextInt(); int N = sc.nextInt(); M += N/25; N %= 25; L += M/4; M %= 4; L %= 10; System.out.println(L+M+N); } }