import java.io.*;
import java.util.StringTokenizer;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception{
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception{
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} Main public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  } main {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  } Main main = new Main(); main new Main() try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    } catch (Exception e) {
      e.printStackTrace();
    } Exception e {
      e.printStackTrace();
    } e.printStackTrace() e.printStackTrace e {
      main.run(args);
    } main.run(args) main.run main args String[] args args private void run(String[] arguments) throws Exception{
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  } run {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  } MyScanner sc = new MyScanner(); sc new MyScanner() PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)); out new PrintWriter(new BufferedOutputStream(System.out)) String line = sc.next(); line sc.next() sc.next sc int threshold = Integer.parseInt(line); threshold Integer.parseInt(line) Integer.parseInt Integer line char[] chars = line.toCharArray(); chars line.toCharArray() line.toCharArray line char[] letters = new char[chars.length]; letters new char[chars.length] chars.length chars chars.length for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    } int i = 0; int i = 0; i 0 i < letters.length i letters.length letters letters.length i++ i++ i {
      letters[i] = chars[0];
    } {
      letters[i] = chars[0];
    } letters[i] = chars[0] letters[i] letters i chars[0] chars 0 int result = Integer.parseInt(new String(letters)); result Integer.parseInt(new String(letters)) Integer.parseInt Integer new String(letters) if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    } result>=threshold result threshold {

    } {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    } for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      } int i = 0; int i = 0; i 0 i < letters.length i letters.length letters letters.length i++ i++ i {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      } {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      } int v = letters[i] + 1; v letters[i] + 1 letters[i] letters i 1 letters[i] =(char)v letters[i] letters i (char)v out.println(new String(letters)) out.println out new String(letters) out.close() out.close out String[] arguments arguments private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  } MyScanner BufferedReader br; br StringTokenizer st; st MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    } MyScanner {
      br = new BufferedReader(new InputStreamReader(System.in));
    } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    } next {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    } while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      } try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        } catch (IOException e) {
          e.printStackTrace();
        } IOException e {
          e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
          st = new StringTokenizer(br.readLine());
        } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
      return Integer.parseInt(next());
    } nextInt {
      return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
      return Long.parseLong(next());
    } nextLong {
      return Long.parseLong(next());
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
      return Double.parseDouble(next());
    } nextDouble {
      return Double.parseDouble(next());
    } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    } nextLine {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    } String str = ""; str "" try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      } IOException e {
        e.printStackTrace();
      } e.printStackTrace() e.printStackTrace e {
        str = br.readLine();
      } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception{
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception{
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} Main
import java.io.*;
import java.util.StringTokenizer;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception{
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    String line = sc.next();
    int threshold = Integer.parseInt(line);
    char[] chars = line.toCharArray();

    char[] letters = new char[chars.length];
    for (int i = 0; i < letters.length; i++) {
      letters[i] = chars[0];
    }
    int result = Integer.parseInt(new String(letters));
    if (result>=threshold){

    }else {
      for (int i = 0; i < letters.length; i++) {
        int v = letters[i] + 1;
        letters[i] =(char)v;
      }
    }
    out.println(new String(letters));
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
}