L = input() M = input() N = input() T = 100*L+25*M+N l = T//100%10 m = T//25%4 n = T%25 print(l+m+n)