n = int(eval(input()))



x = 800*n



y = (n // 15) * 200



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

print((x*800 - (x/15) * 200))



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

x = int(input())
print((x * 800 - (x / 15) * 200))
"""code length ...... """

-n = int(eval(input())) -x = 800 * n -y = (n // 15) * 200 -print((x - y)) +x = int(input()) +print((x * 800 - (x / 15) * 200)) +"""code length ...... """