main :: IO ()
main = do
  n <- readLn
  if n == -1
    then return ()
    else do
      print $ solve n
      main

solve :: Int -> Int
solve n
  | n <= 10 = 4280 - 1150
  | n <= 20 = 4280 - (1150 + 125 * (n - 10))
  | n <= 30 = 4280 - (2400 + 140 * (n - 20))
  | otherwise = 4280 - (3800 + 160 * (n - 30))