l = int(input()) m = int(input()) n = int(input()) #l;100, m:25, n:1 a = n*1//25 x = n-a*25 m = m+a b = m*25//100 y = (m*25%100)//25 l = l+b c = l*100//1000 z = (l*100%1000)//100 print(x+y+z)