import java.util.Scanner; public class Coin { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int[] coins = new int[3]; for (int i = 0; i < coins.length; i++) { coins[i] = stdIn.nextInt(); } while (coins[2] >= 25) { coins[2] -= 25; coins[1]++; } while (coins[1] >= 4) { coins[1] -= 4; coins[0]++; } while (coins[0] >= 10) { coins[0]-=10; } System.out.println(coins[0] + coins[1] + coins[2]); } }