meals = int(eval(input()))



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

unit_price = 800

reward_money = 200



meals = int(eval(input()))



print((unit_price * meals - meals // 15 * reward_money))

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

unit_price = 800
reward_money = 200
meals = int(eval(input()))
print((unit_price * meals - meals // 15 * reward_money))

+unit_price = 800 +reward_money = 200 -print((800 * meals - meals // 15 * 200)) +print((unit_price * meals - meals // 15 * reward_money))