import java.util.Random; import java.util.Scanner; public class Main { public static void main(String args[]){ Scanner scan = new Scanner(System.in); int L = scan.nextInt(); int M = scan.nextInt(); int N = scan.nextInt(); while(N>=25){ N-=25; M++; } while(M>=4){ M-=4; L++; } while(L>=10){ L-=10; } System.out.println(L+M+N); } }