/*
算法训练 s01串
问题描述
s01串初始为"0"
按以下方式变换
0变1,1变01
输入格式
1个整数(0~19)
输出格式
n次变换后s01串
样例输入
3
样例输出
101
数据规模和约定
0~19
*/
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
System.out.println(f(n, new StringBuffer("0")).toString());
}
static StringBuffer f(int n, StringBuffer s) {
if (n < 1)
return s;
int i = 0;
while (i < s.length()) {
if (s.charAt(i) == '0') {
s.setCharAt(i, '1');
i++;
} else {
s.replace(i, i + 1, "01");
i += 2;
}
}
return f(n - 1, s);
}
}