import java.io.*;
import java.util.*;
import java.util.stream.*;

public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} Main private static BufferedReader br = null; br null public static void main(String[] args) {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	} main {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	} String n = read(1)[0]; n read(1)[0] read(1) read 1 0 char x1 = n.charAt(2); x1 n.charAt(2) n.charAt n 2 for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		} int i = 1; int i = 1; i 1 i >= 0 i 0 i-- i-- i {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		} {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		} if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			} x1 > n.charAt(i) x1 n.charAt(i) n.charAt n i {
				x1 = (char)(n.charAt(i) + 1);
			} x1 = (char)(n.charAt(i) + 1) x1 (char)(n.charAt(i) + 1) n.charAt(i) n.charAt n i 1 {
				x1 = n.charAt(i);
			} x1 = n.charAt(i) x1 n.charAt(i) n.charAt n i System.out.println("" + x1 + x1 + x1) System.out.println System.out System System.out "" + x1 + x1 + x1 x1 "" + x1 + x1 + x1 "" x1 x1 x1 String[] args args private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	} read {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	} List<String> strList = new ArrayList<>(); strList new ArrayList<>() try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		} catch (IOException e) {
		} IOException e {
		} {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			} br == null br null {
				br = new BufferedReader(new InputStreamReader(System.in));
			} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
				strList.add(br.readLine());
			} {
				strList.add(br.readLine());
			} strList.add(br.readLine()) strList.add strList br.readLine() br.readLine br return strList.toArray(new String[0]); strList.toArray(new String[0]) strList.toArray strList new String[0] 0 int len len private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	} close {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	} try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		} catch (IOException e) {
		} IOException e {
		} {
			if (br != null) {
				br.close();
			}
		} if (br != null) {
				br.close();
			} br != null br null {
				br.close();
			} br.close() br.close br public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} Main
import java.io.*;
import java.util.*;
import java.util.stream.*;

public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String n = read(1)[0];
		
		char x1 = n.charAt(2);
		for (int i = 1; i >= 0; i--) {
			if (x1 > n.charAt(i)) {
				x1 = (char)(n.charAt(i) + 1);
			} else {
				x1 = n.charAt(i);
			}
		}
		
		System.out.println("" + x1 + x1 + x1);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
}
