N = int(eval(input()))

x = N*800

y = (N//15)*200

print((x-y))
N = int(eval(input()))

x = 800*N

y = (N//15)*200

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

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

-x = N * 800 +x = 800 * N