n = int(eval(input()))

ans = n * 800 - n//15 * 200

print (ans)
n = int(eval(input()))

x = 800*n

y = int(n/15)

print((x-200*y))
n = int(eval(input()))
ans = n * 800 - n // 15 * 200
print(ans)

n = int(eval(input()))
x = 800 * n
y = int(n / 15)
print((x - 200 * y))

-ans = n * 800 - n // 15 * 200 -print(ans) +x = 800 * n +y = int(n / 15) +print((x - 200 * y))