### main

while true
  w = gets.strip.to_i
  break if w < 0

  level = []
  for i in (0..2)
    if w <= 10
      level[i] = w
      w = 0
    else
      level[i] = 10
      w -= 10
    end
  end
  level[3] = w

  fee = 1150 + level[1] * 125 + level[2] * 140 + level[3] * 160
  puts 4280 - fee
end