import java.util.*; import java.lang.*; import java.io.*; class Main { static class Coins{ int c100; int c25; int c1; Coins(int a, int b, int c){this.c100 = a; this.c25 = b; this.c1 = c;} } public static Coins oneToTwentyFive(Coins in) { return (new Coins(in.c100, in.c25 + (in.c1/25), in.c1%25)); } public static Coins twentyFiveToHundred(Coins in){ return new Coins(in.c100 + (in.c25/4), in.c25%4, in.c1); } public static Coins hundredToThousand(Coins in){ return new Coins(in.c100%10, in.c25, in.c1); } public static int coinsToNum(Coins in){ return in.c100 + in.c25 + in.c1; } public static void main (String[] args) { Scanner sc = new Scanner(System.in); Coins coins = new Coins( Integer.parseInt(sc.next()), Integer.parseInt(sc.next()), Integer.parseInt(sc.next())); System.out.println( coinsToNum(hundredToThousand(twentyFiveToHundred(oneToTwentyFive(coins))))); } }