'use strict';

function Main(input) {
  const inp = Number(input);
  const N = input.split("");
  const answerA = [N[0], N[0], N[0]].join("");
  const answerB = [Number(N[0])+1, Number(N[0])+1, Number(N[0])+1].join("");

  if(inp <= answerA) {
    console.log(answerA);
  } else {
    console.log(answerB);
  }

};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
