#include<stdio.h>

int main(void){
	int i;
	puts("20");
	for(i = 0 ; i < 20 ; i++)
		printf("%d ", 1 << i);
	return 0;
}