import java.util.Scanner; public class Main{ static Scanner s=new Scanner(System.in); public static void main(String __[]){ input(); solve(); } private static void input(){ } private static void solve(){ int in=s.nextInt()*100+s.nextInt()*25+s.nextInt(); in%=1000; System.out.println(in/100+(in%100)/25+(in%25)); } }