L = int(input()) M = int(input()) N = int(input()) import math chokin = L * 100 + M * 25 + N shihei = math.floor( chokin / 1000) kouka100 = math.floor( (chokin - shihei * 1000 ) / 100) kouka25 = math.floor( (chokin - ((shihei * 1000) + (kouka100 * 100))) / 25 ) kouka1 = chokin - (shihei * 1000 + kouka100 *100 + kouka25 *25) print(kouka100 + kouka25 + kouka1)