L = int(input()) M = int(input()) N = int(input()) s = (L*100) + (M*25) + (N) s = s % 1000 ans = s // 100 s = s% 25 ans += s // 25 print (ans+s)