L = int(input()) M = int(input()) N = int(input()) LL = L%25 MM = (M+L//25)%4 NN = (N+(M+L//25)//4)%10 OO = (N+(M+L//25)//4)//10 i = LL+MM+NN print(i)