import numpy as np



a = np.array([int(eval(input())) for _ in range(5)])

aa = np.array(list([-(-x//10*10) for x in a]))

b = aa-a

ans = sum(aa)-max(b)

print(ans)
a = [int(eval(input())) for _ in range(5)]

aa = [-(-x//10*10) for x in a]

b = [x-y for x, y in zip(aa, a)]

ans = sum(aa)-max(b)

print(ans)
import numpy as np

a = np.array([int(eval(input())) for _ in range(5)])
aa = np.array(list([-(-x // 10 * 10) for x in a]))
b = aa - a
ans = sum(aa) - max(b)
print(ans)

a = [int(eval(input())) for _ in range(5)]
aa = [-(-x // 10 * 10) for x in a]
b = [x - y for x, y in zip(aa, a)]
ans = sum(aa) - max(b)
print(ans)

-import numpy as np - -a = np.array([int(eval(input())) for _ in range(5)]) -aa = np.array(list([-(-x // 10 * 10) for x in a])) -b = aa - a +a = [int(eval(input())) for _ in range(5)] +aa = [-(-x // 10 * 10) for x in a] +b = [x - y for x, y in zip(aa, a)]