# coding:utf-8 L, M, N = [int(input()) for i in range(3)] L_m = L * 100 M_m = M * 25 N_m = N * 1 one = N_m % 25 twentyFive = (N_m - one + M_m) % 100 oneThousand = (M_m - twentyFive + L_m) % 1000 ans = (one // 1) + (twentyFive // 25) + (oneThousand // 100) print(ans)