x = int(eval(input()))



ans =( 800*x) - ((x//15)*200)



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

x = n*800

y = 200*(n//15)

print((x-y))

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

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

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