#include <stdio.h>
#include <math.h>

int main()
{
	printf("30\n");
	for (int i = 1; i <= 30; i++)
	{
		printf("%.0lf ", pow(2,i));
	}

	return 0;
}