import scala.io.StdIn.readInt

object Main extends App {
  println {
    Iterator.continually(readInt).takeWhile(_ != -1).map { w =>
                val w3 = if(w>30) w-30 else 0
      val w2 = if(w>20) w - w3 -20 else 0
      val w1 = if(w>10) w - w3 - w2 - 10 else 0
      4280 - (1150 + w1*125 + w2*140 + w3*160)
    }.mkString("\n")
  }
}