n = float(input())

c = 0
while n != 0:
    if n >= 500:
        c += 0.9 * n
    else:
        c += n

    n = float(input())

print(c)