#include<iostream>
using namespace std;

int main()
{
	int i;
	cout << 20 << "\n";
	for (i = 0; i < 20; i++)
		cout << (1 << i) << " ";
}