#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
	cin.sync_with_stdio(false);
	
	cout << 20 << '\n';
	for (int i = 0; i < 20; ++i)
		cout << (1 << i) << ' ';
}