import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int M = sc.nextInt(); int N = sc.nextInt(); int total = L*100 + M*25 + N; int coinsum = total%1000; int c100 = coinsum/100 ; int c25 = (coinsum%100)/25 ; int c1 = coinsum%25 ; int r = c100 + c25 + c1 ; System.out.println(r); } }