import math n, c = map(int, input().split()) a = [int(input()) for _ in range(n)] packs = math.ceil(sum(a) / 10) print(packs * c)