import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class string_sm extends Thread {

	void solve() {
		int n = in.nextInt();
		String s = "";
		for (int i = 1; i <= n; i++) {
			if (s.indexOf("" + i) < 0) {
				s += "" + i;
			}
		}
		out.println(s);
	}

	void myAssert(boolean b) {
		if (!b)
			throw new AssertionError();
	}

	Scanner in;
	PrintWriter out;

	public void run() {
		try {
			in = new Scanner(new File("string.in"));
			out = new PrintWriter(new File("string.out"));
			solve();
			out.flush();
			out.close();
			// new FilePrinter("string.out",System.out);
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public static void main(String[] args) {
		new string_sm().start();
	}

}
