import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int en100 =sc.nextInt(); int en25 =sc.nextInt(); int en1 =sc.nextInt(); int en1000 =0; while((en1/25)>0){ en25=en25+1; en1=en1-25; } while((en25/4)>0){ en100=en100+1; en25=en25-4; } while((en100/10)>0){ en1000=en1000+1; en100=en100-10; } System.out.println(en100+en25+en1); sc.close(); } }