import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int num_100 = sc.nextInt(); int num_25 = sc.nextInt(); int num_1 = sc.nextInt(); if (num_1 >= 100) { int temp = num_1/100; num_100 += temp; num_1 -= temp*100; } else if (num_1 >= 25) { int temp = num_1/25; num_25 += temp; num_1 -= temp*25; } if (num_25 >= 4) { int temp = num_25/4; num_100 += temp; num_25 -= temp*4; } if (num_100 >= 10) { int temp = num_100/10; num_100 -= temp*10; } System.out.println(num_100+num_25+num_1); } }