import static java.lang.System.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class bankDepression { public static void main(String[] args) throws IOException { InputStreamReader re = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); //String[] inputs = reader.readLine().split(" "); int hundredCoin = Integer.parseInt(reader.readLine()); int tfCoin = Integer.parseInt(reader.readLine()); int oneCoin = Integer.parseInt(reader.readLine()); if(oneCoin >= 25){ int changeCount = oneCoinChange(oneCoin); oneCoin -= 25 * changeCount; tfCoin += changeCount; } if(tfCoin >= 4){ int changeCount = tfCoinChange(tfCoin); tfCoin -= 4 * changeCount; hundredCoin += changeCount; } if(hundredCoin >= 10){ int changeCount = hundredCoinChange(hundredCoin); hundredCoin -= 10 * changeCount; } System.out.println(hundredCoin + tfCoin + oneCoin); } static int oneCoinChange(int oneCoin){ int count = 0; while(oneCoin >= 25){ oneCoin -= 25; count++; } return count; } static int tfCoinChange(int tfCoin){ int count = 0; while(tfCoin >= 4){ tfCoin -= 4; count++; } return count; } static int hundredCoinChange(int hundredCoin){ int count = 0; while(hundredCoin >= 10){ hundredCoin -= 10; count++; } return count; } }