import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class jeroenb {
	static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

	public static void main(String[] args) throws Exception {
		// Read the input
		int n = Integer.valueOf(in.readLine());

		// Greedily keep subtracting the higest possible number
		ArrayList<Integer> nums = new ArrayList<Integer>();
		while (n > 0) {
			int i = 1;
			while ((i + 1) * (i + 1) * (i + 1) <= n)
				i++;
			nums.add(i);
			n -= i * i * i;
		}

		System.out.println(nums.size());
		for(int i : nums)
			System.out.print(i + " ");
		System.out.println();
	}
}
