package yukicoder032; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int l=sc.nextInt();//100 int m=sc.nextInt();//25 int n=sc.nextInt();//1 m+=n/25; n-=n/25*25; l+=m/4; m-=m/4*4; l-=l/10*10; System.out.println(l+m+n); } }