/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int sum = 0; sum += 100 * Integer.parseInt(br.readLine()); sum += 25 * Integer.parseInt(br.readLine()); sum += Integer.parseInt(br.readLine()); int coin = sum%1000; int ans = coin/100; coin = coin%100; ans += coin/25; coin = coin%25; ans += coin; System.out.println(ans); } }