Table = [1150, 125, 140, 160]

def getFee amount
  case amount
  when 0..10
    Table[0]
  when 11..20
    Table[0] + Table[1] * (amount - 10)
  when 21..30
    Table[0] + Table[1] * 10 + Table[2] * (amount - 20)
  else
    Table[0] + Table[1] * 10 + Table[2] * 10 + Table[3] * (amount - 30)
  end
end

while (n = $stdin.gets.to_i) != -1 do
  puts 4280 - getFee(n)
end