import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

// Arup Guha
// 8/26/2018
// Solution to 2018 UCF Locals Problem: Parity of Strings

import java.util.*;

public class rounding_arup {
	
	public static void main(String[] args) {

		// Get the number...
		Scanner stdin = new Scanner(System.in);
		long n = stdin.nextLong();
		
		// # of 2s in prime fact of n.
		int twos = div(n, 2);
		int fives = div(n, 5);
		ArrayList<Long> res = new ArrayList<Long>();
		
		// Loop over all terms with product 2^i
		long twobase = 1;
		for (int i=0; i<=twos; i++) {
			
			// Loop over all terms with product 5^j
			long fivebase = 1;
			for (int j=0; j<=fives; j++) {
				res.add(twobase*fivebase);
				fivebase *= 5;
			}
			
			// Update
			twobase *= 2;
		}
		
		// Sort and output.
		Collections.sort(res);
		System.out.println(res.size());
		for (int i=0; i<res.size(); i++)
			System.out.println(res.get(i));

	}
	
	// Returns the number of times d divides into n evenly.
	public static int div(long n, int d) {
		int res = 0;
		while (n%d == 0) {
			res++;
			n /= d;
		}
		return res;
	}
}


