#include <stdio.h>
#include <string>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <vector>
#include <iomanip>
#include <map>
#include <sstream>
#include <iterator>
#include <set>
#include <queue>
#include <cstring>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

typedef vector<int> vi;
typedef pair<int, int> ii;


int main()
{
	//freopen("C:\\in.txt","r",stdin);
   // freopen("C:\\out.txt", "w", stdout);
    int n;
    scanf("%d", &n);
    int arr[111];
    arr[0] = 1;
    int target = 20;
    for(int i=1; i<target; ++i){
        arr[i] = arr[i-1]*2;
    }
    printf("%d\n", target);
    for(int i=0; i<target; ++i){
        if(i!=0) printf(" ");
        printf("%d", arr[i]);
    }
    printf("\n");
    return 0;

}