import java.io.*;

/**
 * @author Roman V Satyukov
 */
public class string_rs implements Runnable {
	private final String problemID = getClass().getName().split("_")[0].toLowerCase();
	private BufferedReader in;
	private PrintWriter out;
	
	private void check(boolean expr, String message) {
		if (!expr) {
			throw new AssertionError(message);
		}
	}
	
	private void solve() throws IOException {
		int n = Integer.parseInt(in.readLine());
		check((1 <= n) && (n <= 500), "n is not in [1..500]");
		String result = "";
		for (int i = 1; i <= n; i++) {
			if (result.indexOf("" + i) == -1) {
				result = result + i;
			}
		}
		out.println(result);
	}
	
	public static void main(String[] args) {
		new Thread(new string_rs()).start();
	}

	public void run() {
		try {
			in = new BufferedReader(new FileReader(new File(problemID + ".in")));
			out = new PrintWriter(new File(problemID + ".out"));
			solve();
			in.close();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
}
