import java.util.Scanner; public class A000032 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int total = sc.nextInt()*100+sc.nextInt()*25+sc.nextInt(); sc.close(); int r = (total%1000)/100; r+=(total%100)/25; r+=total%25; System.out.println(r); } }