import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long K = scan.nextInt(); scan.close(); int index1 = 2; int index2 = 0; int flag = 0; for(int i = 2; i < 30; i++) { long x = i * (i - 1); index1 = i; for(int j = 0; j < 30 - i; j++) { long y; y = (long)Math.pow(2, j); if(x * y == 2 * K) { index2 = j; flag = 1; break; } } if(flag == 1) { break; } } System.out.println(index1 + index2); for(int i = 0; i < index1; i++) { if(i == index1 - 1) { System.out.print(1); }else { System.out.print(1 + " "); } } for(int i = 1; i < index2; i++) { if(i == 1) { System.out.print(" " + 0 + " "); } if(i == index2 - 1) { System.out.print(0); }else { System.out.print(0 + " "); } } System.out.println(); } }