/*No.32 貯金箱の憂鬱*/ import java.io.*; public class No32 { public static void main(String[] args) { String h_maisuu[]=new String[3]; int mai_1,mai_25,mai_100,mai_1000=0; try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){ mai_100=Integer.parseInt(input.readLine()); mai_25=Integer.parseInt(input.readLine()); mai_1=Integer.parseInt(input.readLine()); mai_25+=mai_1/25; mai_1%=25; mai_100+=25*mai_25/100; mai_25-=100/25*(25*mai_25/100); mai_1000+=100*mai_100/1000; mai_100-=1000/100*(100*mai_100/1000); System.out.println(mai_1+mai_25+mai_100); }catch(Exception e){ e.printStackTrace(); } } }