main = do
  d <- (readLn :: IO Int)
  let c = foldr (\x acc -> show x ++ acc) "" [0..100]
  putChar $ c !! d