import java.util.*; class y32 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a, h = sc.nextInt(), q = sc.nextInt(), o = sc.nextInt(); a = (h*100+q*25+o)%1000; System.out.println(a/100+(a%100)/25+a%25); sc.close(); } }