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