object Main extends App {

  val n = io.StdIn.readLine()
  println(convert(n.toInt))

  def convert(n: Int): String = {
    val num = n / 100
    val a = (num.toString * 3).toInt

    if (n > a) {
      return (num + 1).toString * 3
    } else {
      return a.toString
    }
  }

}
