Mr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer m and asks for the number of positive integers n, such that the factorial of n ends with exactly m zeroes. Are you among those great programmers who can solve this problem?

The only line of input contains an integer m (1 ≤ m ≤ 100 000) — the required number of trailing zeroes in factorial.

First print k — the number of values of n such that the factorial of n ends with m zeroes. Then print these k integers in increasing order.

NoteThe factorial of n is equal to the product of all integers from 1 to n inclusive, that is n! = 1·2·3·...·n.In the first sample, 5! = 120, 6! = 720, 7! = 5040, 8! = 40320 and 9! = 362880.

using System;

class Program
{
    static int HowManyFives(int x)
    {
        int n = 0;
        int y = x;

        while (y % 5 == 0)
        {
            n += 1;
            y /= 5;
        }

        return n;
    }

    static void Main()
    {
        string input = Console.ReadLine();
        string[] args = input.Split();

        var m = int.Parse(args[0]);

        int z = 0;
        int n = 0;

        while (z < m)
        {
            n += 5;
            z += HowManyFives(n);
        }

        if (z == m)
        {
            Console.WriteLine("5");
            Console.WriteLine("{0} {1} {2} {3} {4}", n, n + 1, n + 2, n + 3, n + 4);
        }
        else
            Console.WriteLine("0");
    }
}

using System;
using System.Collections.Generic;

namespace CSharp
{
    class _633B
    {
        public static void Main()
        {
            int m = int.Parse(Console.ReadLine());

            var result = new List<int>();

            for (int n = 1, zeroes = 0; zeroes <= m; n++)
            {
                int x = n;

                while (x % 5 == 0)
                {
                    x /= 5;
                    zeroes++;

                    if (zeroes > m)
                    {
                        break;
                    }
                }

                if (zeroes == m)
                {
                    result.Add(n);
                }
            }

            Console.WriteLine(result.Count);
            Console.WriteLine(string.Join(" ", result));
        }
    }
}

using System;
using System.Collections.Generic;

namespace _B
{
	class MainClass
	{
		public static void Main ()
		{

			List<int> Num = new List<int> ();
			int m = int.Parse(Console.ReadLine ());

			for (int i = 1; i < 1000000; i++) {

				int t = zero_Fact (i);
				if (t == m)
					Num.Add (i);

			}

			Console.WriteLine (Num.Count);
			string Temp = "";
			for (int i = 0; i < Num.Count; i++) {

				Temp += Num [i] + " ";

			}

			Console.WriteLine (Temp);
			Console.ReadLine ();

		}

		public static int zero_Fact (int N) {

			int Count = 0;
			while (N > 0) {

				N /= 5;
				Count += N;

			}

			return Count;

		}

	}
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){

		int NN=1000000;
		int[] A=new int[NN];
		int[] F=new int[]{5,25,125,625,3125,15625,78125,390625};

		for(int i=0;i<F.Length;i++){
			for(int j=F[i];j<NN;j+=F[i]){A[j]++;}
		}
		int[] B=new int[NN];
		B[0]=0;
		for(int i=1;i<NN;i++){
			B[i]=B[i-1]+A[i];
		}

		int M=0;
		List<int> L=new List<int>();
		for(int i=0;i<NN;i++)if(B[i]==N){M++;L.Add(i);}
		Console.WriteLine(M);
		Console.WriteLine(String.Join(" ",L.ToArray()));

	}
	int N;
	public Sol(){
		N=ri();
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}

/*
 * Created by SharpDevelop.
 * User: ������
 * Date: 28.02.2016
 * Time: 14:49
 *

B. ����������� ������
����������� �� ������� �� ����   2 �������
����������� �� ������ �� ����   256 ��������
����   ����������� ����
�����   ����������� �����
������ ����� ������� ���� ���������� ������������� ���� ������ ����������� ������.
�� ��� �� ����� ������������� ����� m � ������ ����� ���������� ����� ����� ������������� ����� n,
��� ���������� ������ ���������� ����� n ����� ������������� ����� �� m �����.
� �� �������� ���� ���������� ������� �������������, ����� ������ ��� ������?
������� ������
� ������������ ������ ������� ������ �������� ����� ����� m (1 <= m <= 100?000) � ��������� ���������� ����� � ����� ���������� ������ ����������.
�������� ������
������� �������� k � ���������� ����� ����� ����� n, ��� �� ��������� ������������� �� m �����. ����� �������� ��� k ����� ����� � ������� �����������.
�������
������� ������
1
�������� ������
5
5 6 7 8 9
������� ������
5
�������� ������
0
����������
��������� n ��������� ������������ ���� ����� ����� �� 1 �� n ������������, �� ���� n! = 1�2�3�...�n.
� ������ ������� 5! = 120, 6! = 720, 7! = 5040, 8! = 40320 � 9! = 362880.

*/

using System;

class Program
{
	public static void Main(string[] args)
	{
		int n = 0, k = 0;
		int m = int.Parse (Console.ReadLine ());

		for ( n = 5; k < m; n += 5 )
		{
			k++;
			for ( int l = 25; n % l == 0; l *= 5 )
				k++;
		}

		if ( k > m )
			Console.WriteLine ("0");
		else
		{
			Console.WriteLine ("5");
			n -= 5;
			for ( int l=0; l < 5; l++, n++ )
				Console.Write (n + " ");
		}

//		Console.ReadKey (true);
	}
}

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;

namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = Convert.ToInt32(Console.ReadLine());

            int fives = 0;
            for (int i = 5; ; i += 5)
            {
                int temp = i;
                while (temp % 5 == 0)
                {
                    fives++; temp /= 5;
                }
                if (fives > a)
                {
                    Console.WriteLine(0);
                    return;
                }
                if (fives == a)
                {
                    Console.WriteLine(5);
                    Console.WriteLine(i + " " + (i + 1) + " " + (i + 2) + " " + (i + 3) + " " + (i + 4));
                    return;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

namespace Codeforces
{
    class Program : IDisposable
    {
        private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());
        private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());

        void Solve()
        {
            var m = int.Parse(Console.ReadLine());

            var list = new List<int>();

            for (int i = 1; i <= 1000000; i++)
            {
                int res = Res(i);
                if (res == m)
                    list.Add(i);
            }

            Console.WriteLine(list.Count);
            foreach (var i in list)
            {
               Console.Write("{0} ",i);
            }
            //Console.ReadLine();
        }

        int Res(int n)
        {

            int ans = 0;
            int power = 1;
            while (true)
            {
                var lcl = (int) (n/(Math.Pow(5, power)));
                if(lcl==0)
                    break;
                ans += lcl;
                power++;
            }
            return ans;
        }

        static void Main(string[] args)
        {
            var p = new Program();
            p.Solve();
            p.Dispose();
        }

        #region Helpers

        private static int ReadInt()
        {
            return int.Parse(textReader.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(textReader.ReadLine());
        }

        private static int[] ReadIntArray()
        {
            return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        #endregion

        public void Dispose()
        {
            textReader.Close();
            textWriter.Close();
        }
    }
}

using System;

namespace EbonyAndIvory {

    class Program {

        static void Main() {

            int m = int.Parse(Console.ReadLine());

            int n = 0;
            for(int x = 5; n < m; x += 5) {
                int i = 0;
                for(int y = x; y % 5 == 0; y /= 5) {
                    i++;
                }
                n = n + i;
                if(n == m) { Console.WriteLine("5\n{0} {1} {2} {3} {4}", x, x + 1, x + 2, x + 3, x + 4); return; }
            }
            Console.WriteLine("0");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TaskB
{
    class Program
    {
        static void Main(string[] args)
        {
            var m = Convert.ToInt32(Console.ReadLine());
            int zeroCount = 0;

            var listPow5 = new List<int> {5};
            int pow5 = 1;
            int i = 5;

            while (zeroCount < m)
            {
                for(int j = 1; j <= pow5; j++)
                {
                    if (i % listPow5[j-1] == 0)
                    {
                        zeroCount += 1;
                    }
                }

                if (i % (listPow5[pow5 - 1] * 5) == 0)
                {
                    listPow5.Add(listPow5[pow5 - 1] * 5);
                    pow5++;
                    zeroCount++;
                }
                i += 5;
            }

            if (zeroCount == m)
            {
                Console.WriteLine(5);
                Console.WriteLine("{0} {1} {2} {3} {4}", i - 5 , i - 4, i - 3, i - 2, i - 1);
            }
            else
            {
                Console.WriteLine(0);
            }
        }
    }
}

using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public class Program
{
	int max = 0;
	public static void Main(string[] args)
	{
		int m = int.Parse(Console.ReadLine());
		List<int> num = new List<int>();

		int i = 1;
		int zeros = 0;

		while (i <= 5 * m + 5)
		{
			zeros = CountZeros(i, 5);

			if (zeros == m)
			{
				num.Add(i);
			}
			i++;
		}
		Console.WriteLine(num.Count);
		for (int j = 0; j < num.Count; j++)
		{
			Console.WriteLine(num[j]);
		}
	}

	private static int CountZeros(int i, int divide)
	{
		if (i < divide)
			return 0;
		else
			return (i / divide) + CountZeros(i, divide * 5);
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Trivialproblem
{
    class Program
    {
        static void Main(string[] args)
        {
            int m = int.Parse(Console.ReadLine());
            int zeros = 0;
            int a = 0;
            while (zeros<m)
            {
                a += 5;
                int div = 5;
                zeros = 0;
                while (div<=a)
                {
                    zeros += a / div;
                    div *= 5;
                }
            }

            if (zeros == m)
            {
                Console.WriteLine(5);
                for (int i = a; i <= a + 4; i++) Console.Write("{0} ", i);
            }
            else
                Console.Write(0);

        }
    }
}

using System;
using System.IO;
using System.Text;

namespace A_Trivial_Problem
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int m = Next();

            int count = 0;
            for (int i = 5;; i += 5)
            {
                count++;
                int k = i/5;
                while (k%5 == 0)
                {
                    count++;
                    k /= 5;
                }
                if (count > m)
                {
                    writer.WriteLine("0");
                    break;
                }
                else if (count == m)
                {
                    writer.WriteLine("5");
                    for (int j = 0; j < 5; j++)
                    {
                        writer.Write(i + j);
                        writer.Write(' ');
                    }
                    break;
                }
            }

            writer.Flush();
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = MyConsoleInputStreamParser.GetLong;
            long zeroCount = 0, i = 5;
            while (zeroCount <= 100000)
            {
                var temp = i;
                while (temp % 5 == 0)
                {
                    zeroCount++;
                    temp /= 5;
                }
                if (zeroCount == n)
                {
                    Console.WriteLine(5);
                    Console.WriteLine("{0} {1} {2} {3} {4}", i, i + 1, i + 2, i + 3, i + 4);
                    break;
                }
                if (zeroCount > n)
                {
                    Console.WriteLine(0);
                    break;
                }
                i += 5;
            }
        }

        public static string Reverse(string str)
        {
            var newStr = new StringBuilder(str,str.Length);
            for (int i = 0; i < str.Length / 2; i++)
            {
                var temp = newStr[str.Length - 1 - i];
                newStr[str.Length - 1 - i] = newStr[i];
                newStr[i] = temp;
            }
            return newStr.ToString();
        }

        public static class MyConsoleInputStreamParser
        {
            private static TextReader reader = new StreamReader(Console.OpenStandardInput());
            private static Queue<string> currentLineStrings = new Queue<string>();

            public static string GetLine { get { return reader.ReadLine(); } }

            public static string GetString { get { while (currentLineStrings.Count == 0) currentLineStrings = new Queue<string>(GetStringArray); return currentLineStrings.Dequeue(); } }

            public static int GetInt { get { return int.Parse(GetString); } }

            public static long GetLong { get { return long.Parse(GetString); } }

            public static double GetDouble { get { return double.Parse(GetString, CultureInfo.InvariantCulture); } }

            public static char[] GetCharArray { get { return GetLine.ToCharArray(); } }

            public static string[] GetStringArray { get { return GetLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); } }

            public static int[] GetIntArray { get { return GetStringArray.Select(int.Parse).ToArray(); } }

            public static long[] GetLongArray { get { return GetStringArray.Select(long.Parse).ToArray(); } }

            public static double[] GetDoubleArray { get { return GetStringArray.Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); } }

            public static char[][] ReturnCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetCharArray; return matrix; }

            public static string[][] ReturnStringMatrix(int numberOfRows) { string[][] matrix = new string[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetStringArray; return matrix; }

            public static int[][] ReturnIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetIntArray; return matrix; }

            public static long[][] ReturnLongMatrix(int numberOfRows) { long[][] matrix = new long[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetLongArray; return matrix; }

            public static double[][] ReturnDoubleMatrix(int numberOfRows) { double[][] matrix = new double[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetDoubleArray; return matrix; }
        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Numerics;

namespace ConsoleApplication1
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;
        private int index = 0;
        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }
        class Cut
        {
            public int a;
            public int b;
            public int line;
        }

        object Get()
        {
            checked
            {
                var inp = ReadLong();
                int i = 5;
                while (true)
                {
                    var c = Count(i);
                    if (c == inp)
                        return "5\n" + new[] { i, i + 1, i + 2, i + 3, i + 4 }.Select(x => x.ToString()).JoinStrings(" ");
                    if (c > inp)
                        return "0";
                    i += 5;
                }
                throw new Exception("HUj");
            }
        }

        public int Count(int number)
        {
            var zeros = 0;
            var d = 5;
            while (number >= d)
            {
                zeros += number / d;
                d *= 5;
            }
            return zeros;
        }

        object Get2()
        {
            FileName = "strange";
            checked
            {
                var s = Read();
                var first = GetNext(s);
                var second = GetNext(s);
                var single = new Dictionary<char, int>();
                var twin = new Dictionary<Tuple<char, char>, List<Tuple<long, long>>>();
                single[first.Item1] = first.Item2;
                if (second == null)
                    return first.Item2;
                do
                {
                    if (!single.ContainsKey(second.Item1) || single[second.Item1] < second.Item2)
                        single[second.Item1] = second.Item2;
                    var pair = Tuple.Create(first.Item1, second.Item1);
                    if (!twin.ContainsKey(pair))
                        twin[pair] = new List<Tuple<long, long>>();
                    twin[pair].Add(Tuple.Create((long)first.Item2, (long)second.Item2));
                    first = second;
                    second = GetNext(s);
                } while (second != null);
                long result = single.Select(x => x.Value).Sum();
                foreach (var kv in twin)
                    result += ProcessPair(kv.Value);
                return result;
            }
        }

        public long ProcessPair(List<Tuple<long, long>> counts)
        {
            checked
            {
                var sorted = counts.OrderByDescending(x => x.Item1).ThenByDescending(x => x.Item2).ToArray();
                var filtered = new List<Tuple<long, long>>() { sorted[0] };
                for (int i = 1; i < sorted.Length; i++)
                    if (sorted[i].Item2 > filtered.Last().Item2)
                        filtered.Add(sorted[i]);

                var previous = filtered[0];
                var result = previous.Item1 * previous.Item2;
                for (int i = 1; i < filtered.Count; i++)
                    result += (filtered[i].Item2 - previous.Item2) * filtered[i].Item1;
                return result;
            }
        }

        public Tuple<char, int> GetNext(string s)
        {
            if (index == s.Length)
                return null;
            var ch = s[index];
            var count = 0;
            while (index < s.Length && ch == s[index])
            {
                count++;
                index++;
            }
            return Tuple.Create(ch, count);
        }

        public double ProcessPair(long[] a, long[] b, int p)
        {
            return ((double)NumberOfDivs(a, p) * 2000) / Count(a) +
                ((double)NumberOfDivs(b, p) * 2000) / Count(b) -
                ((double)(NumberOfDivs(a, p) * NumberOfDivs(b, p))) * 2000 / (Count(a) * Count(b));
        }

        public long NumberOfDivs(long[] a, int p)
        {
            return a[1] / p - (a[0] - 1) / p;
        }

        public long Count(long[] a)
        {
            return a[1] - a[0] + 1;
        }

        bool DoubleEquals(double a, double b)
        {
            return Math.Abs(a - b) < 0.0000000001;
        }

        bool SameLine(double[] a, double[] b, double[] c)
        {
            var x = a[0];
            var y = a[1];
            var x1 = b[0];
            var y1 = b[1];
            var x2 = c[0];
            var y2 = c[1];
            return DoubleEquals((x - x1) * (y2 - y1), (y - y1) * (x2 - x1));
        }

        double Distance(double[] a, double[] b)
        {
            return Math.Sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]));
        }

        object Get7()
        {
            checked
            {
                var m = ReadInt();
                var p = ReadLongs();
                var arr = p.GroupBy(x => x).Select(g => new { g.Key, Count = g.Count() }).ToArray();
                var even = arr.Where(x => (x.Count & 1) == 0).FirstOrDefault();
                if (even != null)
                {
                    var index = Array.IndexOf(arr, even);
                    //arr[index].Count = arr[index].Count / 2;
                }
                long divs = 1;
                long result = 1;
                foreach (var a in arr)
                {
                    var pi = a.Key;
                    var curr = pi;
                    var olddivs = divs;
                    var oldres = result;
                    for (int i = 0; i < a.Count; i++)
                    {
                        result = (result * oldres % commonMod) * FastPow(curr, olddivs, commonMod) % commonMod;
                        curr = curr * pi % commonMod;
                        divs = (divs + olddivs) % (commonMod - 1);
                    }
                }
                return result;
            }
        }

        public long FastPow(long x, BigInteger pow, long mod)
        {
            if (pow == 0)
                return 1;
            if ((pow & 1) == 0)
                return FastPow(x * x % mod, pow / 2, mod);
            return x * FastPow(x, pow - 1, mod) % mod;
        }

        //object Get3()
        //{
        //    FileName = "";
        //    checked
        //    {
        //        var n = ReadInt();
        //        var hor = new List<Cut>();
        //        var ver = new List<Cut>();
        //        for (int i = 0; i < n; i++)
        //        {
        //            var a = ReadInts();
        //            if (a[0] == a[2])
        //                ver.Add(new Cut() { a = Math.Min(a[1], a[3]), b = Math.Max(a[1], a[3]), line = a[0] });
        //            else
        //                hor.Add(new Cut() { a = Math.Min(a[0], a[2]), b = Math.Max(a[0], a[2]), line = a[1] });
        //        }
        //        ver = Merge(ver);
        //        hor = Merge(hor);

        //    }
        //}

        List<Cut> Merge(List<Cut> l)
        {
            var a = l.OrderBy(x => x.line).ThenBy(x => x.a).ToArray();
            Cut previous = null;
            var result = new List<Cut>();
            for (int i = 0; i < a.Length; i++)
                if (previous == null)
                    previous = a[i];
                else
                    if (previous.line == a[i].line && previous.b >= a[i].a)
                        previous.b = Math.Max(previous.b, a[i].b);
                    else
                    {
                        result.Add(previous);
                        previous = a[i];
                    }
            if (previous != null)
                result.Add(previous);
            return result;
        }

    }
    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (string.IsNullOrEmpty(FileName))
                return Console.ReadLine();
            if (f == null)
                f = new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName + ".in");
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return Convert.ToInt32(Read());
        }
        protected int[] ReadInts()
        {
            return Read().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            return Read().Split(' ').Select(x => Convert.ToInt64(x)).ToArray();
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName + ".out", r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {
            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-NB-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func)
        {
            T result = default(T);
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }
    }
}

using System;

class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        int t = 5, q = 0;
        int num = 0;
        while (true)
        {
            int zeros = t / 5 + t / (5 * 5) + t / (5 * 5 * 5) + t / (5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5 * 5 * 5);
            //Console.WriteLine(t + " " + zeros);
            if (zeros == n)
            {
                num = t;
                q = 5;
            }
            else if (zeros > n)
                break;
            t += 5;
        }

        Console.WriteLine(q);
        if (q == 5)
        {
            Console.WriteLine("{0} {1} {2} {3} {4}", num, num + 1, num + 2, num + 3, num + 4);
        }
        Console.ReadLine();
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Globalization;

#if DEBUG
using System.Diagnostics;
#endif

namespace CompetitiveProgramming
{
    class Program
    {
        static bool s_IsMultipleTestCases = false;
        static void Main(string[] args)
        {
#if DEBUG
            var streamReader = new StreamReader("../../input.txt", Encoding.ASCII, false, 32768);
            var streamWriter = new StreamWriter("../../output.txt", false, Encoding.ASCII, 32768);
            var timer = new Stopwatch();
            timer.Start();
#else
            var streamReader = new StreamReader(Console.OpenStandardInput(32768), Encoding.ASCII, false, 32768);
            var streamWriter = new StreamWriter(Console.OpenStandardOutput(32768), Encoding.ASCII, 32768);
#endif
            var reader = new InputReader(streamReader);

            var numberOfTest = 1;
            if (s_IsMultipleTestCases)
            {
                numberOfTest = reader.NextInt();
            }
            for (var testNumber = 1; testNumber <= numberOfTest; ++testNumber)
            {
                Task solver = new Task();
                solver.Solve(testNumber, reader, streamWriter);
            }
#if DEBUG
            streamWriter.WriteLine("\nEslapsed Time: " + timer.ElapsedMilliseconds + " ms");
#endif
            streamReader.Close();
            streamWriter.Close();
        }
    }

    class Task
    {
        const int MAXN = 100;
        long ans = 0;
        string res = string.Empty;
        public void Solve(int testNumber, InputReader reader, StreamWriter writer)
        {
            var m = reader.NextLong();
            var lst = new List<long>();

            var two = 0;
            var five = 0;
            for (int i = 2; ; i++)
            {
                var x = i;
                while (x % 2 == 0)
                {
                    two++;
                    x >>= 1;
                }

                x = i;
                while (x % 5 == 0)
                {
                    five++;
                    x /= 5;
                }
                if (Min(two, five) > m) break;
                if (Min(two, five) == m)
                {
                    lst.Add(i);
                }

            }

            writer.WriteLine(lst.Count);
            writer.WriteLine(string.Join(" ", lst));
        }

        #region Utilities
        private string ConvertArrayToString(int[] arrs)
        {
            var sb = new StringBuilder();
            foreach (var item in arrs)
            {
                sb.Append(item);
                sb.Append("\n");
            }
            return sb.ToString();
        }

        private string ConvertArrayToString(long[] arrs)
        {
            var sb = new StringBuilder();
            foreach (var item in arrs)
            {
                sb.Append(item);
                sb.Append("\n");
            }
            return sb.ToString();
        }

        private string ConvertDoubleToString(double x)
        {
            return x.ToString(CultureInfo.InvariantCulture);
        }

        private int Max(int a, int b)
        {
            return Math.Max(a, b);
        }

        private int Min(int a, int b)
        {
            return Math.Min(a, b);
        }

        private long Max(long a, long b)
        {
            return Math.Max(a, b);
        }

        private long Min(long a, long b)
        {
            return Math.Min(a, b);
        }

        private long GCD(long a, long b)
        {
            return a > 0 ? b : GCD(b, a % b);
        }

        private int GCD(int a, int b)
        {
            return a > 0 ? b : GCD(b, a % b);
        }

        #endregion
    }

    class InputReader
    {
        private char[] _inbuf;
        private int _lenbuf = 0, _ptrbuf = 0;
        private StreamReader _reader;

        public InputReader(StreamReader reader)
        {
            _reader = reader;
            _inbuf = new char[1024];
            _lenbuf = 0;
            _ptrbuf = 0;
        }

        private int ReadByte()
        {
            if (_lenbuf == -1)
                throw new Exception();
            if (_ptrbuf >= _lenbuf)
            {
                _ptrbuf = 0;
                try
                {
                    _lenbuf = _reader.Read(_inbuf, 0, 1024);
                }
                catch (IOException e)
                {
                    throw e;
                }
                if (_lenbuf <= 0)
                    return -1;
            }
            return _inbuf[_ptrbuf++];
        }

        private bool IsSpaceChar(int c)
        {
            return !(c >= 33 && c <= 126);
        }

        private int Skip()
        {
            int b;
            while ((b = ReadByte()) != -1 && IsSpaceChar(b)) ;
            return b;
        }

        public int NextInt()
        {
            int num = 0, b;
            var minus = false;
            while ((b = ReadByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-')
            {
                minus = true;
                b = ReadByte();
            }

            while (true)
            {
                if (b >= '0' && b <= '9')
                {
                    num = num * 10 + (b - '0');
                }
                else
                {
                    return minus ? -num : num;
                }
                b = ReadByte();
            }
        }

        public long NextLong()
        {
            long num = 0, b;
            var minus = false;
            while ((b = ReadByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-')
            {
                minus = true;
                b = ReadByte();
            }

            while (true)
            {
                if (b >= '0' && b <= '9')
                {
                    num = num * 10 + (b - '0');
                }
                else
                {
                    return minus ? -num : num;
                }
                b = ReadByte();
            }
        }

        public string Next()
        {
            var b = Skip();
            var sb = new StringBuilder();
            while (!(IsSpaceChar(b)))
            {
                sb.Append((char)b);
                b = ReadByte();
            }
            return sb.ToString();
        }

        public double NextDouble()
        {
            return double.Parse(Next(), CultureInfo.InvariantCulture);
        }

        public int[] NIS(int n)
        {
            var arrs = new int[n];
            for (int i = 0; i < n; i++)
            {
                arrs[i] = NextInt();
            }
            return arrs;
        }

        public long[] NLS(int n)
        {
            var arrs = new long[n];
            for (int i = 0; i < n; i++)
            {
                arrs[i] = NextLong();
            }
            return arrs;
        }
    }

}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            {
                task.Solve(1, sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(int testNumber, InputReader sr, TextWriter sw)
        {
            var max = 1000001;
            var m = sr.NextInt32();
            var answ = new List<int>[100001];
            for (var i = 1; i < max; i++)
            {
                var count = Count(i);
                if (count < answ.Length)
                {
                    if (answ[count] == null)
                    {
                        answ[count] = new List<int>();
                    }
                    answ[count].Add(i);
                }
            }
            if (answ[m] == null)
            {
                sw.WriteLine(0);
            }
            else
            {
                sw.WriteLine(answ[m].Count);
                for (var i = 0; i < answ[m].Count; i++)
                {
                    sw.WriteLine(answ[m][i] + " ");
                }
            }
        }

        private int Count(int n)
        {
            int count = 0;

            for (int i = 5; n / i >= 1; i *= 5)
                count += n / i;

            return count;
        }

        private BigInteger Fact(BigInteger i)
        {
            if (i == 0)
                return 1;
            return i*Fact(i - 1);
        }
    }

    internal class InputReader : IDisposable
    {
        private bool isDispose;
        private readonly TextReader sr;

        public InputReader(TextReader stream)
        {
            sr = stream;
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        public string NextString()
        {
            var result = sr.ReadLine();
            return result;
        }

        public int NextInt32()
        {
            return Int32.Parse(NextString());
        }

        public long NextInt64()
        {
            return Int64.Parse(NextString());
        }

        public string[] NextSplitStrings()
        {
            return NextString()
                .Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);
        }

        public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
        {
            return NextSplitStrings()
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
        }

        protected void Dispose(bool dispose)
        {
            if (!isDispose)
            {
                if (dispose)
                    sr.Close();
                isDispose = true;
            }
        }

        ~InputReader()
        {
            Dispose(false);
        }
    }
}

using System;
using System.Globalization;
using System.Linq;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var i = (int)BinarySearch(1, long.MaxValue, m, GetCount);

            if (i == -1)
            {
                Print(0);
            }
            else
            {
                Print(5);
                Print(string.Join(" ", Enumerable.Range(i / 5 * 5, 5)));
            }
        }

        private static long BinarySearch(long low, long high, long goal, Func<long, long> f)
        {
            while (low <= high)
            {
                var mid = (low + high) / 2;

                if (goal < f(mid))
                {
                    high = mid - 1;
                }
                else if (f(mid) < goal)
                {
                    low = mid + 1;
                }
                else
                {
                    return mid;
                }
            }

            return -1;
        }

        private static long GetCount(long n)
        {
            var count = 0L;
            for (var t = 5L; t <= n; t *= 5) { count += n / t; }
            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());
            var result = new List<long>();
            var count = 0L;

            for (var i = 1; count <= m; i++)
            {
                count = GetCount(i);

                if (count == m)
                {
                    result.Add(i);
                }
            }

            Print(result.Count);

            if (result.Count > 0) { Print(string.Join(" ", result)); }
        }

        private static long GetCount(long n)
        {
            var count = 0L;

            for (var t = 5L; t <= n; t *= 5)
            {
                count += n / t;
            }

            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
        private static void Print(double x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }

        private static string S(long x) { return x.ToString(CultureInfo.InvariantCulture); }
        private static string S(double x) { return x.ToString(CultureInfo.InvariantCulture); }
    }
}

using System;
using System.Globalization;
using System.Linq;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());
            var count = 0L;

            for (var i = 1; count <= m; i++)
            {
                count = GetCount(i);

                if (count == m)
                {
                    Print(5);
                    Print(string.Join(" ", Enumerable.Range(i, 5)));
                    return;
                }
            }

            Print(0);
        }

        private static long GetCount(long n)
        {
            var count = 0L;
            for (var t = 5L; t <= n; t *= 5) { count += n / t; }
            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
    }
}

using System;
using System.Globalization;
using System.Linq;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var i = (int)BinarySearch(1, long.MaxValue, m, GetCount);

            if (i == -1)
            {
                Print(0);
            }
            else
            {
                Print(5);
                Print(string.Join(" ", Enumerable.Range(i / 5 * 5, 5)));
            }
        }

        private static long BinarySearch(long low, long high, long goal, Func<long, long> f)
        {
            while (low <= high)
            {
                var mid = (low + high) / 2;
                var x = f(mid);

                if (goal < x)
                {
                    high = mid - 1;
                }
                else if (x < goal)
                {
                    low = mid + 1;
                }
                else
                {
                    return mid;
                }
            }

            return -1;
        }

        private static long GetCount(long n)
        {
            var count = 0L;
            for (var t = 5L; t <= n; t *= 5) { count += n / t; }
            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
    }
}

using System;
using System.Globalization;
using System.Linq;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var i = (int)BinarySearch(1, int.MaxValue, m, GetCount);

            if (i == -1)
            {
                Print(0);
            }
            else
            {
                Print(5);
                Print(string.Join(" ", Enumerable.Range(i / 5 * 5, 5)));
            }
        }

        private static long BinarySearch(long low, long high, long goal, Func<long, long> f)
        {
            while (low <= high)
            {
                var mid = (low + high) / 2;
                var x = f(mid);

                if (goal < x)
                {
                    high = mid - 1;
                }
                else if (x < goal)
                {
                    low = mid + 1;
                }
                else
                {
                    return mid;
                }
            }

            return -1;
        }

        private static long GetCount(long n)
        {
            var count = 0L;
            for (var t = 5L; t <= n; t *= 5) { count += n / t; }
            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace TestProject
{
	class Program
	{
		private static int count(int a)
		{
			int result = 0;
			while (a > 0)
			{
				a /= 5;
				result += a;
			}
			return result;
		}
		static void Main(string[] args)
		{
			String input = null;
			String output = null;
#if LOCALTEST
			input = "../../in.txt";
			output = "../../out.txt";
#endif
			FastReader reader = new FastReader(input);
			FastWriter writer = new FastWriter(output);

			int m = reader.nextInt();

			int left = m, right = m * 5 + 5;
			int mid = -1, t = -1;
			while (left < right)
			{
				mid = (left + right) / 2;
				t = count(mid);
				if (t < m) left = mid + 1;
				else if (t > m) right = mid;
				else
				{
					left = mid;
					break;
				}
			}
			if (t == m)
			{
				left = left / 5 * 5;
				writer.WriteLine(5);
				for (int i = 0; i < 5; ++i)
				{
					writer.Write(string.Format("{0} ", left + i));
				}
			}
			else writer.Write(0);
			//flush
			writer.Close();
		}
	}

	class FastReader
	{
		private TextReader reader = null;
		private Queue<String> q = null;

		public FastReader(String fileName)
		{
			try
			{
				if (fileName != null)
				{
					reader = new StreamReader(fileName);
				}
				else
				{
					reader = System.Console.In;
				}
			}
			catch (FileNotFoundException e)
			{
				throw e;
			}
		}

		public FastReader()
		{
			reader = System.Console.In;
		}

		public String next() {
			while (q == null || q.Count == 0)
			{
				q = new Queue<string>(reader.ReadLine().Split());
			}
			return q.Dequeue();
		}

		public int nextInt()
		{
			return Int32.Parse(next());
		}

		public long nextLong()
		{
			return Int64.Parse(next());
		}

		public double nextDouble()
		{
			return Double.Parse(next());
		}
	}

	class FastWriter
	{
		private TextWriter writer = null;

		public FastWriter (String fileName )
		{
			try
			{
				if (fileName != null)
				{
					writer = new StreamWriter(fileName);
				}
				else
				{
					writer = System.Console.Out;
				}
			}
			catch (FileNotFoundException e)
			{
				throw e;
			}
		}

		public FastWriter()
		{
			writer = System.Console.Out;
		}

		public void Write(params object[] parameters)
		{
			foreach (object o in parameters)
			{
				writer.Write(o.ToString());
			}
		}

		public void WriteLine(params object[] parameters)
		{
			foreach (object o in parameters)
			{
				writer.Write(o.ToString());
			}
			writer.WriteLine();
		}

		public void Close()
		{
			writer.Close();
		}
	}

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TrivialProblem
{
    class Program
    {
        static void Main(string[] args)
        {
            int m = Convert.ToInt32(Console.ReadLine());
            int output = 0;
            int sayac = 0;

            for (int i = 5; ; i+=5)
            {
                if (i % Math.Pow(5, 1) == 0)
                {
                    sayac++;
                    if (i % Math.Pow(5, 2) == 0)
                    {
                        sayac++;
                        if (i % Math.Pow(5, 3) == 0)
                        {
                            sayac++;
                            if (i % Math.Pow(5, 4) == 0)
                            {
                                sayac++;
                                if (i % Math.Pow(5, 5) == 0)
                                {
                                    sayac++;
                                    if (i % Math.Pow(5, 6) == 0)
                                    {
                                        sayac++;
                                        if (i % Math.Pow(5, 7) == 0)
                                        {
                                            sayac++;
                                            if (i % Math.Pow(5, 8) == 0)
                                            {
                                                sayac++;
                                                if (i % Math.Pow(5, 9) == 0)
                                                {
                                                    sayac++;
                                                    if (i % Math.Pow(5, 10) == 0)
                                                    {
                                                        sayac++;
                                                        if (i % Math.Pow(5, 11) == 0)
                                                        {
                                                            sayac++;
                                                            if (i % Math.Pow(5, 12) == 0)
                                                            {
                                                                sayac++;
                                                                if (i % Math.Pow(5, 13) == 0)
                                                                {
                                                                    sayac++;

                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                if (sayac == m)
                {
                    Console.WriteLine("5");
                    Console.WriteLine("{0} {1} {2} {3} {4}", i, i + 1, i + 2, i + 3, i + 4);
                    return;
                }
                else if (sayac > m)
                {
                    Console.WriteLine("0");
                    return;
                }

            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    int Fun(int x)
    {
        int p = 2;
        int r2 = 0;
        while (p <= x)
        {
            r2 += x / p;
            p *= 2;
        }
        p = 5;
        int r5 = 0;
        while (p <= x)
        {
            r5 += x / p;
            p *= 5;
        }
        return Math.Min(r2, r5);
    }

    public void Solve()
    {
        var ans = new List<int>();
        int n = ReadInt();
        for (int i = 1; ; i++)
        {
            int x = Fun(i);
            if (x > n)
                break;
            if (x == n)
                ans.Add(i);
        }

        Write(ans.Count);
        WriteArray(ans);
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
            new Solver().Solve();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            int k = Convert.ToInt32(Console.ReadLine());
            ArrayList ans = new ArrayList();
            for (int i = 0; ; i++)
            {
                int zer = zeroes(i);
                if (zer == k)
                {
                    ans.Add(i);
                }
                else if (zer > k)
                {
                    break;
                }
            }
            Console.WriteLine(ans.Count);
            if (ans.Count > 0)
            {
                foreach (int item in ans)
                {
                    Console.Write(item.ToString() + " ");
                }
            }

        }

        static int zeroes(int f)
        {
            double mul = 1;
            int ans = 0;
            while (true)
            {
                int temp = (int)(f / Math.Truncate(Math.Pow(5, mul++)));
                if (temp == 0) break;
                else
                    ans += temp;
            }
            return ans;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CF633B {
    class Program {
        static void Main(string[] args) {
            int trailing = Convert.ToInt32(Console.ReadLine());

            int factorial = 0;
            int zeros = 0;
            while(zeros < trailing) {
                factorial += 5;

                if(factorial % 5 == 0) {
                    zeros++;
                }
                int pow = 2;
                while(factorial % (int)Math.Pow(5, pow) == 0) {
                    zeros++;
                    pow++;
                }
            }

            if(zeros == trailing) {
                Console.WriteLine(5);
                for(int i = 0; i < 5; i++) {
                    Console.Write(factorial + i + " ");
                }
                Console.WriteLine();
            } else {
                Console.WriteLine("0");
            }
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Codeforces
{
    class B
    {
        private static ThreadStart s_threadStart = new B().Go;
        private static bool s_time = false;
        private static double s_eps = 1e-16;

        private void Go()
        {
            int m = GetInt();

            int current = 5;
            int tmp;
            int count = 1;

            while (count < m)
            {
                current += 5;
                tmp = current;
                while (tmp % 5 == 0)
                {
                    count++;
                    tmp /= 5;
                }
            }

            if (count == m)
            {
                Wl(5);
                Console.Write(current);
                for (int i = 1; i < 5; i++)
                {
                    Console.Write(" " + (current + i));
                }
                Wl("");
            }
            else
            {
                Wl("0");
            }
        }

        #region Template

        public static void Main(string[] args)
        {
            System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
            Thread main = new Thread(new ThreadStart(s_threadStart), 200 * 1024 * 1024);
            timer.Start();
            main.Start();
            main.Join();
            timer.Stop();
            if (s_time)
                Wl(timer.ElapsedMilliseconds);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            while (ioEnum == null || !ioEnum.MoveNext())
            {
                ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
            }

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString(), CultureInfo.InvariantCulture);
        }

        private static long GetLong()
        {
            return long.Parse(GetString(), CultureInfo.InvariantCulture);
        }

        private static double GetDouble()
        {
            return double.Parse(GetString(), CultureInfo.InvariantCulture);
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            if (o is double)
            {
                Wld((o as double?).Value, "");
            }
            else if (o is float)
            {
                Wld((o as float?).Value, "");
            }
            else
                Console.WriteLine(o.ToString());
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            Wl(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        private static void Wld(double d, string format)
        {
            Wl(d.ToString(format, CultureInfo.InvariantCulture));
        }

        #endregion
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace codeforces
{
	class Program
	{
		public const int Osn = 1000000007;

		public class Pair
		{
			public long First;

			public long Second;
		}

		public class PairComparer : IComparer<Pair>
		{
			public int Compare(Pair x, Pair y)
			{
				if (x.First < y.First || (x.First == y.First && x.Second > y.Second))
					return -1;
				return 1;
			}
		}

		public static long GetGcd(long a, long b)
		{
			while (true)
			{
				if (b == 0)
					return a;
				var a1 = a;
				a = b;
				b = a1 % b;

			}
		}

		public static void WriteYesNo(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string ReadString()
		{
			return Console.ReadLine();
		}

		public static List<int> ReadListOfInts()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static List<long> ReadListOfLongs()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(long.Parse).ToList();
		}

		public static int ReadInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static long ReadLong()
		{
			var s = Console.ReadLine();
			return long.Parse(s);
		}

		public class Vertex
		{
			public int Was;

			public List<int> Edges;
		}

		public static List<Vertex> Graph = new List<Vertex>();

		public static bool Dfs(int u)
		{
			if (Graph[u].Was == 1) return true;
			if (Graph[u].Was == 2) return false;
			Graph[u].Was = 1;
			foreach (var t in Graph[u].Edges)
			{
				if (Dfs(t)) return true;
			}

			Graph[u].Was = 2;
			return false;
		}

		public static bool IsPrime(int x)
		{
			for (var j = 2; j * j <= x; ++j)
				if (x % j == 0)
					return false;
			return true;
		}

		public class LinkedVertex
		{
			public int Next;

			public int Prev;

			public int Value;
		}

		public static int BinarySearch(List<int> list, int value)
		{
			var l = -1;
			var r = list.Count;
			while (r - l > 1)
			{
				var m = (r + l) / 2;
				if (list[m] >= value)
					r = m;
				else
					l = m;
			}

			return r;
		}

		private static void Main()
		{
			var n = ReadInt();
			var fives = 0;
			var ans = new List<int>();
			var i = 1;
			while (fives <= n)
			{
				i++;
				var j = i;
				while (j % 5 == 0)
				{
					fives++;
					j /= 5;
				}
				if (fives == n)
					ans.Add(i);
			}
			Console.WriteLine(ans.Count);
			for (var ii = 0; ii < ans.Count; ++ii)
				Console.Write("{0} ", ans[ii]);
			Console.ReadLine();
		}
	}
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Globalization;

class Program
{

    //////////////////////////////////////////////////
    void Solution()
    {
        var m = rl;
        var a = new List<int>();
        int zeros = 0;
        for (int j = 1; j <= 500000; j++)
        {
            var i = j;

            while (i % 5 == 0)
            {
                zeros++;
                i /= 5;
            }
            if (zeros == m)
                a.Add(j);
            else if (zeros > m)
                break;
        }

        if (a.Count == 0)
            wln(0);
        else
        {
            wln(a.Count);
            foreach (var o in a)
                wsp(o);
        }
    }
    //////////////////////////////////////////////////

    static void swap(ref object o1, ref object o2) { var o = o1; o1 = o2; o2 = o; }
    static void wln(object o = null) { Console.WriteLine(o); }
    static void wsp(object o) { Console.Write(o+" "); }
    static void wrt(object o) { Console.Write(o); }
    //Console.Write(string.Format(CultureInfo.InvariantCulture, "{0:F12}", o));

    static long gcd(long a, long b) { return (b!=0) ? gcd(b, a % b) : a; }
    static long lcm(long a, long b) { return a / gcd(a, b) * b; }

    int ri
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; } int p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    long rl
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; } long p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    double rd
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind; int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            long p = 0, q = 1; while (_ind < _count && _str[_ind] != ' ' && _str[_ind] != '.') p = p * 10 + _str[_ind++] - '0';
            if (_ind < _count && _str[_ind] == '.') { ++_ind; while (_ind < _count && _str[_ind] != ' ') { p = p * 10 + _str[_ind++] - '0'; q *= 10; } }
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return (double)p / q * sign;
        }
    }
    string rs
    {
        get
        {
            _read(); while (_ind < _count && _str[_ind] == ' ') ++_ind;
            var tmp = _str.IndexOf(' ', _ind);
            if (tmp == -1) { _count = 0; _ind = 0; return _str.Substring(_ind); }
            var s = _str.Substring(_ind, tmp - _ind); _ind = tmp + 1;
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return s;
        }
    }

    int[] ria(int n)
    {
        var res = new int[n];
        for (int k = 0; k < n; )
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                int p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    long[] rla(int n)
    {
        var res = new long[n];
        for (int k = 0; k < n; )
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    double[] rda(int n)
    {
        var res = new double[n];
        for (int k = 0; k < n; )
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0, q = 1; while (i < m && s[i] != ' ' && s[i] != '.') p = p * 10 + s[i++] - '0';
                if (i < m && s[i] == '.') { ++i; while (i < m && s[i] != ' ') { p = p * 10 + s[i++] - '0'; q *= 10; } }
                res[k++] = (double)p / q * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    string[] rsa(int n) { var res = new string[n]; for (int k = 0; k < n; ++k) res[k] = Console.ReadLine(); _count = 0; _ind = 0; return res; }
    string _str = null; int _count = 0; int _ind = 0;
    void _read() { if (_ind == _count) { _str = Console.ReadLine(); _count = _str.Length; _ind = 0; } }
    static void Main() { new Program().Solution(); }
}

using System;
using System.Linq;

namespace _633B
{
    class Program
    {
        static void Main()
        {
            var m = long.Parse(Console.ReadLine());
            int counter = 0;
            for (int i = 5; ; i+=5)
            {
                if (i % 5 == 0)
                {
                    var temp = i;
                    while (temp%5 == 0)
                    {
                        counter++;
                        temp /= 5;
                    }
                }
                if (counter == m)
                {
                    Console.WriteLine("5");
                    for (int j=0; j < 5; j++)
                    {
                        Console.Write(i++ + " ");
                    }
                    break;
                }
                else if (counter > m)
                {
                    Console.WriteLine("0");
                    break;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

namespace Codeforces
{
    class Program : IDisposable
    {
        private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());
        private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());

        void Solve()
        {
            //var str = Console.ReadLine().Split(' ');
            //var a = int.Parse(str[0]);
            //var b = int.Parse(str[1]);
            //var c = int.Parse(str[2]);

            //for (int i = 0; i <= 10000; i++)
            //{
            //    for (int j = 0; j <= 10000; j++)
            //    {
            //        var lclRes = i*a + j*b;
            //        if (lclRes == c)
            //        {
            //            Console.WriteLine("Yes");
            //            return;
            //        }
            //    }
            //}
            //Console.WriteLine("No");
           // Console.ReadLine();

            //B
            var m = int.Parse(Console.ReadLine());
            int ans = 0;

            var list = new List<int>();
            if (m<6)
            {
                var first = m*5;
                list.Add(first);
                for(int i=1;i<=4;i++)
                    list.Add(first+i);
            }
            Console.WriteLine(list.Count);
            foreach (var i in list)
            {
               Console.Write("{0} ",i);
            }
           // Console.ReadLine();
        }

        static void Main(string[] args)
        {
            var p = new Program();
            p.Solve();
            p.Dispose();
        }

        #region Helpers

        private static int ReadInt()
        {
            return int.Parse(textReader.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(textReader.ReadLine());
        }

        private static int[] ReadIntArray()
        {
            return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        #endregion

        public void Dispose()
        {
            textReader.Close();
            textWriter.Close();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

namespace Codeforces
{
    class Program : IDisposable
    {
        private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());
        private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());

        void Solve()
        {
            var m = int.Parse(Console.ReadLine());

            var list = new List<int>();

            for (int i = 1; i <= 1000000; i+=5)
            {
                int res = Res(i);
                if (res == m)
                    list.Add(i);
            }

            Console.WriteLine(list.Count);
            foreach (var i in list)
            {
               Console.Write("{0} ",i);
            }
            //Console.ReadLine();
        }

        int Res(int n)
        {
            int ans = 0;
            int power = 1;
            while (true)
            {
                var lcl = (int) (n/(Math.Pow(5, power)));
                if(lcl==0)
                    break;
                ans += lcl;
                power++;
            }
            return ans;
        }

        static void Main(string[] args)
        {
            var p = new Program();
            p.Solve();
            p.Dispose();
        }

        #region Helpers

        private static int ReadInt()
        {
            return int.Parse(textReader.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(textReader.ReadLine());
        }

        private static int[] ReadIntArray()
        {
            return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        #endregion

        public void Dispose()
        {
            textReader.Close();
            textWriter.Close();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

namespace Codeforces
{
    class Program : IDisposable
    {
        private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());
        private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());

        void Solve()
        {
            //var str = Console.ReadLine().Split(' ');
            //var a = int.Parse(str[0]);
            //var b = int.Parse(str[1]);
            //var c = int.Parse(str[2]);

            //for (int i = 0; i <= 10000; i++)
            //{
            //    for (int j = 0; j <= 10000; j++)
            //    {
            //        var lclRes = i*a + j*b;
            //        if (lclRes == c)
            //        {
            //            Console.WriteLine("Yes");
            //            return;
            //        }
            //    }
            //}
            //Console.WriteLine("No");
           // Console.ReadLine();

            //B
            var m = int.Parse(Console.ReadLine());
            int ans = 0;

            var list = new List<int>();
            if (m == 1)
            {
                list = new List<int>(){5,6,7,8,9};
            }
            else if(m==2)
            {
                list = new List<int>() { 10,11,12,13,14 };
            }
            else if (m == 3)
            {
                list = new List<int>() { 15,16,17,18,19 };
            }
            else if (m == 4)
            {
                list = new List<int>() { 20,21,22,23,24 };
            }
            else if (m == 6)
            {
                list = new List<int>() {25,26,27,28,29 };
            }
            Console.WriteLine(list.Count);
            foreach (var i in list)
            {
               Console.Write("{0} ",i);
            }
          //  Console.ReadLine();
        }

        static void Main(string[] args)
        {
            var p = new Program();
            p.Solve();
            p.Dispose();
        }

        #region Helpers

        private static int ReadInt()
        {
            return int.Parse(textReader.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(textReader.ReadLine());
        }

        private static int[] ReadIntArray()
        {
            return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        #endregion

        public void Dispose()
        {
            textReader.Close();
            textWriter.Close();
        }
    }
}

using System;
using System.Collections.Generic;

namespace _B
{
	class MainClass
	{
		public static void Main ()
		{

			List<int> Num = new List<int> ();
			int m = int.Parse(Console.ReadLine ());

			for (int i = 5 * m; i < 5 * (m + 1); i++) {

				int t = zero_Fact (i);
				if (t == m)
					Num.Add (i);

			}

			Console.WriteLine (Num.Count);
			string Temp = "";
			for (int i = 0; i < Num.Count; i++) {

				Temp += Num [i] + " ";

			}

			Console.WriteLine (Temp);
			Console.ReadLine ();

		}

		public static int zero_Fact (int N) {

			int Count = 0;
			while (N > 0) {

				N /= 5;
				Count += N;

			}

			return Count;

		}

	}
}

using System;
using System.Collections.Generic;

namespace _B
{
	class MainClass
	{
		public static void Main ()
		{

			List<int> Num = new List<int> ();
			int m = int.Parse(Console.ReadLine ());

			for (int i = 1; i < 100000; i++) {

				int t = zero_Fact (i);
				if (t == m)
					Num.Add (i);

			}

			Console.WriteLine (Num.Count);
			string Temp = "";
			for (int i = 0; i < Num.Count; i++) {

				Temp += Num [i] + " ";

			}

			Console.WriteLine (Temp);
			Console.ReadLine ();

		}

		public static int zero_Fact (int N) {

			int Count = 0;
			while (N > 0) {

				N /= 5;
				Count += N;

			}

			return Count;

		}

	}
}

using System;
using System.Collections.Generic;

namespace _B
{
	class MainClass
	{
		public static void Main ()
		{

			List<int> Num = new List<int> ();
			int m = int.Parse(Console.ReadLine ());

			/*for (int i = 1; i < 100000; i++) {

				int t = zero_Fact (i);
				if (t == m)
					Num.Add (i);

			}*/

			for (int i = m * 5; i < (m + 1) * 5; i++) {

				if (i > 6)
					Num.Add (i - 5);
				else if (i < 6)
					Num.Add (i);

			}

			Console.WriteLine (Num.Count);
			string Temp = "";
			for (int i = 0; i < Num.Count; i++) {

				Temp += Num [i] + " ";

			}

			Console.WriteLine (Temp);
			Console.ReadLine ();

		}

		public static int zero_Fact (int N) {

			int Count = 0;
			while (N > 0) {

				N /= 5;
				Count += N;

			}

			return Count;

		}

	}
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

namespace Codeforces
{
    class Program : IDisposable
    {
        private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());
        private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());

        void Solve()
        {
            //var str = Console.ReadLine().Split(' ');
            //var a = int.Parse(str[0]);
            //var b = int.Parse(str[1]);
            //var c = int.Parse(str[2]);

            //for (int i = 0; i <= 10000; i++)
            //{
            //    for (int j = 0; j <= 10000; j++)
            //    {
            //        var lclRes = i*a + j*b;
            //        if (lclRes == c)
            //        {
            //            Console.WriteLine("Yes");
            //            return;
            //        }
            //    }
            //}
            //Console.WriteLine("No");
           // Console.ReadLine();

            //B
            var m = int.Parse(Console.ReadLine());
            int ans = 0;

            var list = new List<int>();

            //for (int i = 1; i <= 100000; i++)
            //{
            //    int res = Res(i);
            //    if(res == m)
            //        list.Add(i);
            //}
            if (m == 5 || m%6 == 5)
                ans = 0;
            else
            {
                var r = m/6;
                m -= r;
                var first = m*5;
                list.Add(first);
                for (int i = 1; i <=4; i++)
                {
                    list.Add(first+i);
                }
            }
            Console.WriteLine(list.Count);
            foreach (var i in list)
            {
               Console.Write("{0} ",i);
            }
           // Console.ReadLine();
        }

        int Res(int n)
        {

            int ans = 0;
            int power = 1;
            while ((n/(Math.Pow(5, power))) >= 1)
            {
                var lcl = (int) (n/(Math.Pow(5, power)));
                ans += lcl;
                power++;
            }
            return ans;
        }

        static void Main(string[] args)
        {
            var p = new Program();
            p.Solve();
            p.Dispose();
        }

        #region Helpers

        private static int ReadInt()
        {
            return int.Parse(textReader.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(textReader.ReadLine());
        }

        private static int[] ReadIntArray()
        {
            return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        #endregion

        public void Dispose()
        {
            textReader.Close();
            textWriter.Close();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TaskB
{
    class Program
    {
        static void Main(string[] args)
        {
            var m = Convert.ToInt32(Console.ReadLine());
            int zeroCount = 0;

            var listPow5 = new List<int> {5};
            int pow5 = 1;
            int i = 5;

            while (zeroCount < m)
            {
                for(int j = 1; j <= pow5; j++)
                {
                    if (i % listPow5[j-1] == 0)
                    {
                        zeroCount += j;
                    }
                }

                if (i % (listPow5[pow5 - 1] * 5) == 0)
                {
                    listPow5.Add(listPow5[pow5 - 1] * 5);
                    pow5++;
                    zeroCount++;
                }
                i += 5;
            }

            if (zeroCount == m)
            {
                Console.WriteLine(5);
                Console.WriteLine("{0} {1} {2} {3} {4}", i - 5 , i - 4, i - 3, i - 2, i - 1);
            }
            else
            {
                Console.WriteLine(0);
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Trivialproblem
{
    class Program
    {
        static void Main(string[] args)
        {
            int m = int.Parse(Console.ReadLine());
            int zeros = 0;
            int a = 0;
            while (zeros<m)
            {
                a += 5;
                zeros = a / 5;
            }
            if (zeros == m)
            {
                for (int i = a; i <= a + 4; i++) Console.Write("{0} ", i);
            }
            else
                Console.Write(0);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Trivialproblem
{
    class Program
    {
        static void Main(string[] args)
        {
            int m = int.Parse(Console.ReadLine());
            int zeros = 0;
            int a = 0;
            while (zeros<m)
            {
                a += 5;
                zeros = a / 5;
            }
            if (zeros == m)
            {
                Console.WriteLine(5);
                for (int i = a; i <= a + 4; i++) Console.Write("{0} ", i);
            }
            else
                Console.Write(0);

        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = MyConsoleInputStreamParser.GetLong;
            long lastZeroCount = 0, zeroCount = 0, i = 5;
            while (zeroCount <= 100000 )
            {
                if (i % 25 == 0)
                    lastZeroCount += 1;
                zeroCount = lastZeroCount + i / 5;
                if (zeroCount == n)
                {
                    Console.WriteLine(5);
                    Console.WriteLine("{0} {1} {2} {3} {4}", i, i + 1, i + 2, i + 3, i + 4);
                    break;
                }
                if (zeroCount > n)
                {
                    Console.WriteLine(0);
                    break;
                }
                i += 5;
            }
        }

        public static string Reverse(string str)
        {
            var newStr = new StringBuilder(str,str.Length);
            for (int i = 0; i < str.Length / 2; i++)
            {
                var temp = newStr[str.Length - 1 - i];
                newStr[str.Length - 1 - i] = newStr[i];
                newStr[i] = temp;
            }
            return newStr.ToString();
        }

        public static class MyConsoleInputStreamParser
        {
            private static TextReader reader = new StreamReader(Console.OpenStandardInput());
            private static Queue<string> currentLineStrings = new Queue<string>();

            public static string GetLine { get { return reader.ReadLine(); } }

            public static string GetString { get { while (currentLineStrings.Count == 0) currentLineStrings = new Queue<string>(GetStringArray); return currentLineStrings.Dequeue(); } }

            public static int GetInt { get { return int.Parse(GetString); } }

            public static long GetLong { get { return long.Parse(GetString); } }

            public static double GetDouble { get { return double.Parse(GetString, CultureInfo.InvariantCulture); } }

            public static char[] GetCharArray { get { return GetLine.ToCharArray(); } }

            public static string[] GetStringArray { get { return GetLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); } }

            public static int[] GetIntArray { get { return GetStringArray.Select(int.Parse).ToArray(); } }

            public static long[] GetLongArray { get { return GetStringArray.Select(long.Parse).ToArray(); } }

            public static double[] GetDoubleArray { get { return GetStringArray.Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); } }

            public static char[][] ReturnCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetCharArray; return matrix; }

            public static string[][] ReturnStringMatrix(int numberOfRows) { string[][] matrix = new string[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetStringArray; return matrix; }

            public static int[][] ReturnIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetIntArray; return matrix; }

            public static long[][] ReturnLongMatrix(int numberOfRows) { long[][] matrix = new long[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetLongArray; return matrix; }

            public static double[][] ReturnDoubleMatrix(int numberOfRows) { double[][] matrix = new double[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetDoubleArray; return matrix; }
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = MyConsoleInputStreamParser.GetLong;
            long zeroCount = 0, i = 5;
            while (zeroCount <= 100000)
            {
                var sevencount = i / 78125;
                var sixcount = i / 15625 - sevencount;
                var fivecount = i / 3125 - sixcount - sevencount;
                var fourcount = i / 625 - fivecount - sixcount - sevencount;
                var threecount = i / 125 - fourcount - fivecount - sixcount - sevencount;
                var twocount = i / 25 - fourcount - fivecount - sixcount - sevencount - threecount;
                var firstcount = i / 5 - fourcount - fivecount - sixcount - sevencount - threecount - twocount;
                zeroCount = firstcount + twocount * 2 + threecount * 3 + fourcount * 4 + fivecount * 5 + sixcount * 6 + 7 * sevencount;
                if (zeroCount == n)
                {
                    Console.WriteLine(5);
                    Console.WriteLine("{0} {1} {2} {3} {4}", i, i + 1, i + 2, i + 3, i + 4);
                    break;
                }
                if (zeroCount > n)
                {
                    Console.WriteLine(0);
                    break;
                }
                i += 5;
            }
        }

        public static string Reverse(string str)
        {
            var newStr = new StringBuilder(str,str.Length);
            for (int i = 0; i < str.Length / 2; i++)
            {
                var temp = newStr[str.Length - 1 - i];
                newStr[str.Length - 1 - i] = newStr[i];
                newStr[i] = temp;
            }
            return newStr.ToString();
        }

        public static class MyConsoleInputStreamParser
        {
            private static TextReader reader = new StreamReader(Console.OpenStandardInput());
            private static Queue<string> currentLineStrings = new Queue<string>();

            public static string GetLine { get { return reader.ReadLine(); } }

            public static string GetString { get { while (currentLineStrings.Count == 0) currentLineStrings = new Queue<string>(GetStringArray); return currentLineStrings.Dequeue(); } }

            public static int GetInt { get { return int.Parse(GetString); } }

            public static long GetLong { get { return long.Parse(GetString); } }

            public static double GetDouble { get { return double.Parse(GetString, CultureInfo.InvariantCulture); } }

            public static char[] GetCharArray { get { return GetLine.ToCharArray(); } }

            public static string[] GetStringArray { get { return GetLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); } }

            public static int[] GetIntArray { get { return GetStringArray.Select(int.Parse).ToArray(); } }

            public static long[] GetLongArray { get { return GetStringArray.Select(long.Parse).ToArray(); } }

            public static double[] GetDoubleArray { get { return GetStringArray.Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); } }

            public static char[][] ReturnCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetCharArray; return matrix; }

            public static string[][] ReturnStringMatrix(int numberOfRows) { string[][] matrix = new string[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetStringArray; return matrix; }

            public static int[][] ReturnIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetIntArray; return matrix; }

            public static long[][] ReturnLongMatrix(int numberOfRows) { long[][] matrix = new long[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetLongArray; return matrix; }

            public static double[][] ReturnDoubleMatrix(int numberOfRows) { double[][] matrix = new double[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetDoubleArray; return matrix; }
        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Numerics;

namespace ConsoleApplication1
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;
        private int index = 0;
        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }
        class Cut
        {
            public int a;
            public int b;
            public int line;
        }

        object Get()
        {
            checked
            {
                var inp = ReadLong();
                int i = 5;
                while (true)
                {
                    var c = Count(i);
                    if (c == inp)
                        return new[] { i, i + 1, i + 2, i + 3, i + 4 }.Select(x => x.ToString()).JoinStrings(" ");
                    if (c > inp)
                        return "0";
                    i += 5;
                }
                throw new Exception("HUj");
            }
        }

        public int Count(int number)
        {
            var zeros = 0;
            var d = 5;
            while (number >= d)
            {
                zeros += number / d;
                d *= 5;
            }
            return zeros;
        }

        object Get2()
        {
            FileName = "strange";
            checked
            {
                var s = Read();
                var first = GetNext(s);
                var second = GetNext(s);
                var single = new Dictionary<char, int>();
                var twin = new Dictionary<Tuple<char, char>, List<Tuple<long, long>>>();
                single[first.Item1] = first.Item2;
                if (second == null)
                    return first.Item2;
                do
                {
                    if (!single.ContainsKey(second.Item1) || single[second.Item1] < second.Item2)
                        single[second.Item1] = second.Item2;
                    var pair = Tuple.Create(first.Item1, second.Item1);
                    if (!twin.ContainsKey(pair))
                        twin[pair] = new List<Tuple<long, long>>();
                    twin[pair].Add(Tuple.Create((long)first.Item2, (long)second.Item2));
                    first = second;
                    second = GetNext(s);
                } while (second != null);
                long result = single.Select(x => x.Value).Sum();
                foreach (var kv in twin)
                    result += ProcessPair(kv.Value);
                return result;
            }
        }

        public long ProcessPair(List<Tuple<long, long>> counts)
        {
            checked
            {
                var sorted = counts.OrderByDescending(x => x.Item1).ThenByDescending(x => x.Item2).ToArray();
                var filtered = new List<Tuple<long, long>>() { sorted[0] };
                for (int i = 1; i < sorted.Length; i++)
                    if (sorted[i].Item2 > filtered.Last().Item2)
                        filtered.Add(sorted[i]);

                var previous = filtered[0];
                var result = previous.Item1 * previous.Item2;
                for (int i = 1; i < filtered.Count; i++)
                    result += (filtered[i].Item2 - previous.Item2) * filtered[i].Item1;
                return result;
            }
        }

        public Tuple<char, int> GetNext(string s)
        {
            if (index == s.Length)
                return null;
            var ch = s[index];
            var count = 0;
            while (index < s.Length && ch == s[index])
            {
                count++;
                index++;
            }
            return Tuple.Create(ch, count);
        }

        public double ProcessPair(long[] a, long[] b, int p)
        {
            return ((double)NumberOfDivs(a, p) * 2000) / Count(a) +
                ((double)NumberOfDivs(b, p) * 2000) / Count(b) -
                ((double)(NumberOfDivs(a, p) * NumberOfDivs(b, p))) * 2000 / (Count(a) * Count(b));
        }

        public long NumberOfDivs(long[] a, int p)
        {
            return a[1] / p - (a[0] - 1) / p;
        }

        public long Count(long[] a)
        {
            return a[1] - a[0] + 1;
        }

        bool DoubleEquals(double a, double b)
        {
            return Math.Abs(a - b) < 0.0000000001;
        }

        bool SameLine(double[] a, double[] b, double[] c)
        {
            var x = a[0];
            var y = a[1];
            var x1 = b[0];
            var y1 = b[1];
            var x2 = c[0];
            var y2 = c[1];
            return DoubleEquals((x - x1) * (y2 - y1), (y - y1) * (x2 - x1));
        }

        double Distance(double[] a, double[] b)
        {
            return Math.Sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]));
        }

        object Get7()
        {
            checked
            {
                var m = ReadInt();
                var p = ReadLongs();
                var arr = p.GroupBy(x => x).Select(g => new { g.Key, Count = g.Count() }).ToArray();
                var even = arr.Where(x => (x.Count & 1) == 0).FirstOrDefault();
                if (even != null)
                {
                    var index = Array.IndexOf(arr, even);
                    //arr[index].Count = arr[index].Count / 2;
                }
                long divs = 1;
                long result = 1;
                foreach (var a in arr)
                {
                    var pi = a.Key;
                    var curr = pi;
                    var olddivs = divs;
                    var oldres = result;
                    for (int i = 0; i < a.Count; i++)
                    {
                        result = (result * oldres % commonMod) * FastPow(curr, olddivs, commonMod) % commonMod;
                        curr = curr * pi % commonMod;
                        divs = (divs + olddivs) % (commonMod - 1);
                    }
                }
                return result;
            }
        }

        public long FastPow(long x, BigInteger pow, long mod)
        {
            if (pow == 0)
                return 1;
            if ((pow & 1) == 0)
                return FastPow(x * x % mod, pow / 2, mod);
            return x * FastPow(x, pow - 1, mod) % mod;
        }

        //object Get3()
        //{
        //    FileName = "";
        //    checked
        //    {
        //        var n = ReadInt();
        //        var hor = new List<Cut>();
        //        var ver = new List<Cut>();
        //        for (int i = 0; i < n; i++)
        //        {
        //            var a = ReadInts();
        //            if (a[0] == a[2])
        //                ver.Add(new Cut() { a = Math.Min(a[1], a[3]), b = Math.Max(a[1], a[3]), line = a[0] });
        //            else
        //                hor.Add(new Cut() { a = Math.Min(a[0], a[2]), b = Math.Max(a[0], a[2]), line = a[1] });
        //        }
        //        ver = Merge(ver);
        //        hor = Merge(hor);

        //    }
        //}

        List<Cut> Merge(List<Cut> l)
        {
            var a = l.OrderBy(x => x.line).ThenBy(x => x.a).ToArray();
            Cut previous = null;
            var result = new List<Cut>();
            for (int i = 0; i < a.Length; i++)
                if (previous == null)
                    previous = a[i];
                else
                    if (previous.line == a[i].line && previous.b >= a[i].a)
                        previous.b = Math.Max(previous.b, a[i].b);
                    else
                    {
                        result.Add(previous);
                        previous = a[i];
                    }
            if (previous != null)
                result.Add(previous);
            return result;
        }

    }
    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (string.IsNullOrEmpty(FileName))
                return Console.ReadLine();
            if (f == null)
                f = new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName + ".in");
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return Convert.ToInt32(Read());
        }
        protected int[] ReadInts()
        {
            return Read().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            return Read().Split(' ').Select(x => Convert.ToInt64(x)).ToArray();
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName + ".out", r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {
            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-NB-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func)
        {
            T result = default(T);
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }
    }
}

using System;

class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        int t = 5, q = 0;
        int[] nums = new int[2000000];
        while (true)
        {
            int zeros = t / 5 + t / (5 * 5) + t / (5 * 5 * 5) + t / (5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5);
            if (zeros == n)
            {
                nums[q] = t;
                q++;
            }
            else if (zeros > n)
                break;
            t++;
        }

        Console.WriteLine(q);
        for (int i = 0; i < q; i++)
        {
            Console.Write(nums[i] + ((i == q - 1) ? "" : " "));
        }
        Console.ReadLine();
    }
}

using System;

class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        int t = 5, q = 0;
        int[] nums = new int[2000000];
        while (true)
        {
            int zeros = t / 5 + t / (5 * 5) + t / (5 * 5 * 5) + t / (5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5) + t / (5 * 5 * 5 * 5 * 5 * 5 * 5);
            //Console.WriteLine(t + " " + zeros);
            if (zeros == n)
            {
                nums[q] = t;
                q++;
            }
            else if (zeros > n)
                break;
            t++;
        }

        Console.WriteLine(q);
        for (int i = 0; i < q; i++)
        {
            Console.Write(nums[i] + ((i == q - 1) ? "" : " "));
        }
        Console.ReadLine();
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            {
                task.Solve(1, sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(int testNumber, InputReader sr, TextWriter sw)
        {
            var max = 1000001;
            var m = sr.NextInt32();
            var answ = new List<int>[100001];
            for (var i = 1; i < max; i++)
            {
                var count = Count(i);
                if (count < answ.Length)
                {
                    if (answ[count] == null)
                    {
                        answ[count] = new List<int>();
                    }
                    answ[count].Add(i);
                }
            }
            if (answ[m] == null)
            {
                sw.WriteLine(0);
            }
            else
            {
                for (var i = 0; i < answ[m].Count; i++)
                {
                    sw.WriteLine(answ[m][i] + " ");
                }
            }
        }

        private int Count(int n)
        {
            int count = 0;

            for (int i = 5; n / i >= 1; i *= 5)
                count += n / i;

            return count;
        }

        private BigInteger Fact(BigInteger i)
        {
            if (i == 0)
                return 1;
            return i*Fact(i - 1);
        }
    }

    internal class InputReader : IDisposable
    {
        private bool isDispose;
        private readonly TextReader sr;

        public InputReader(TextReader stream)
        {
            sr = stream;
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        public string NextString()
        {
            var result = sr.ReadLine();
            return result;
        }

        public int NextInt32()
        {
            return Int32.Parse(NextString());
        }

        public long NextInt64()
        {
            return Int64.Parse(NextString());
        }

        public string[] NextSplitStrings()
        {
            return NextString()
                .Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);
        }

        public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
        {
            return NextSplitStrings()
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
        }

        protected void Dispose(bool dispose)
        {
            if (!isDispose)
            {
                if (dispose)
                    sr.Close();
                isDispose = true;
            }
        }

        ~InputReader()
        {
            Dispose(false);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var result = new List<long>();

            for (var i = 0; i < 100000; i++)
            {
                var x = (i / 5) * 5;
                var n = x / 5;

                if (n == m)
                {
                    result.Add(i);
                }
                else if (m < n)
                {
                    break;
                }
            }

            Print(result.Count);

            if (result.Count > 0)
            {
                Print(string.Join(" ", result));
            }
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
        private static void Print(double x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }

        private static string S(long x) { return x.ToString(CultureInfo.InvariantCulture); }
        private static string S(double x) { return x.ToString(CultureInfo.InvariantCulture); }
    }
}

using System;
using System.Globalization;
using System.Linq;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());
            var count = 0L;

            for (var i = 1; count <= m; i++)
            {
                count = GetCount(i);

                if (count == m)
                {
                    Print(5);
                    Print(string.Join(" ", Enumerable.Range(i, 5)));
                }
            }
        }

        private static long GetCount(long n)
        {
            var count = 0L;
            for (var t = 5L; t <= n; t *= 5) { count += n / t; }
            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var result = new List<long>();

            for (var i = 1; i < 100000; i++)
            {
                var count = GetCount(i);

                if (count == m)
                {
                    result.Add(i);
                }
                else if (m < count)
                {
                    break;
                }
            }

            Print(result.Count);

            if (result.Count > 0) { Print(string.Join(" ", result)); }
        }

        private static long GetCount(long n)
        {
            var count = 0L;

            for (var t = 5L; t <= n; t *= 5)
            {
                count += n / t;
            }

            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
        private static void Print(double x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }

        private static string S(long x) { return x.ToString(CultureInfo.InvariantCulture); }
        private static string S(double x) { return x.ToString(CultureInfo.InvariantCulture); }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var result = new List<long>();

            var count = 0L;

            for (var i = 1; m < count; i++)
            {
                count = GetCount(i);

                if (count == m)
                {
                    result.Add(i);
                }
            }

            Print(result.Count);

            if (result.Count > 0) { Print(string.Join(" ", result)); }
        }

        private static long GetCount(long n)
        {
            var count = 0L;

            for (var t = 5L; t <= n; t *= 5)
            {
                count += n / t;
            }

            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
        private static void Print(double x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }

        private static string S(long x) { return x.ToString(CultureInfo.InvariantCulture); }
        private static string S(double x) { return x.ToString(CultureInfo.InvariantCulture); }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;

namespace Codeforces
{
    internal static class Program
    {
        private static void Main()
        {
            var m = long.Parse(Console.ReadLine());

            var result = new List<long>();

            for (var i = 0; i < 100000; i++)
            {
                var x = (i / 5) * 5;
                var count = GetDivisorCount(x, 5) + GetDivisorCount(x, 10);

                if (count == m)
                {
                    result.Add(i);
                }
                else if (m < count)
                {
                    break;
                }
            }

            Print(result.Count);

            if (result.Count > 0)
            {
                Print(string.Join(" ", result));
            }
        }

        private static long GetDivisorCount(long n, long divisor)
        {
            var count = 0;

            while (0 < n && n % divisor == 0)
            {
                count++;
                n /= divisor;
            }

            return count;
        }

        private static void Print(string s) { Console.WriteLine(s); }
        private static void Print(long x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }
        private static void Print(double x) { Console.WriteLine(x.ToString(CultureInfo.InvariantCulture)); }

        private static string S(long x) { return x.ToString(CultureInfo.InvariantCulture); }
        private static string S(double x) { return x.ToString(CultureInfo.InvariantCulture); }
    }
}

using System;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            int k = Convert.ToInt32(Console.ReadLine());
            ArrayList ans = new ArrayList();
            for (int i = 0;; i++)
            {
                int zer = zeroes(i);
                if (zer == k)
                {
                    ans.Add(i);
                }
                else if (zer > k)
                {
                    break;
                }
            }

        }

        static int zeroes(int f)
        {
            double mul = 1;
            int ans = 0;
            while(true)
            {
                int temp = (int)(f / Math.Truncate(Math.Pow(5, mul++)));
                if (temp == 0) break;
                else
                ans += temp;
            }
            return ans;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CF633B {
    class Program {
        static void Main(string[] args) {
            int trailing = Convert.ToInt32(Console.ReadLine());

            int factorial = 0;
            int zeros = 0;
            while(zeros < trailing) {
                factorial += 5;

                if(factorial % 5 == 0) {
                    zeros++;
                }
                int pow = 2;
                while(factorial == (int)Math.Pow(5, pow)) {
                    zeros++;
                    pow++;
                }
            }

            if(zeros == trailing) {
                Console.WriteLine(5);
                for(int i = 0; i < 5; i++) {
                    Console.Write(factorial + i + " ");
                }
                Console.WriteLine();
            } else {
                Console.WriteLine("0");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CF633B {
    class Program {
        static void Main(string[] args) {
            int trailing = Convert.ToInt32(Console.ReadLine());

            int factorial = 0;
            int zeros = 0;
            while(zeros < trailing) {
                factorial += 5;

                if(factorial % 5 == 0) {
                    zeros++;
                }
                int pow = 2;
                while(factorial == Math.Pow(5, pow)) {
                    zeros++;
                }
            }

            if(zeros == trailing) {
                for(int i = 0; i < 5; i++) {
                    Console.Write(factorial + i + " ");
                }
                Console.WriteLine();
            } else {
                Console.WriteLine("0");
            }
        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Globalization;

class Program
{
    //////////////////////////////////////////////////
    void Solution()
    {
        var m = rl;
        var a = new List<int>();
        int count2 = 0;
        int zeros = 0;
        for (int j = 1; j <= 100000; j++)
        {
            var i = j;
            while ((i & 1) == 0)
            {
                count2++;
                i >>= 1;
            }

            while (i % 5 == 0)
            {
                count2--;
                zeros++;
                i /= 5;
            }
            if (zeros == m)
                a.Add(j);
            else if (zeros > m)
                break;
        }

        if (a.Count == 0)
            wln(0);
        else
        {
            wln(a.Count);
            foreach (var o in a)
                wsp(o);
        }
    }
    //////////////////////////////////////////////////

    static void swap(ref object o1, ref object o2) { var o = o1; o1 = o2; o2 = o; }
    static void wln(object o = null) { Console.WriteLine(o); }
    static void wsp(object o) { Console.Write(o+" "); }
    static void wrt(object o) { Console.Write(o); }
    //Console.Write(string.Format(CultureInfo.InvariantCulture, "{0:F12}", o));

    static long gcd(long a, long b) { return (b!=0) ? gcd(b, a % b) : a; }
    static long lcm(long a, long b) { return a / gcd(a, b) * b; }

    int ri
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; } int p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    long rl
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; } long p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    double rd
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind; int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            long p = 0, q = 1; while (_ind < _count && _str[_ind] != ' ' && _str[_ind] != '.') p = p * 10 + _str[_ind++] - '0';
            if (_ind < _count && _str[_ind] == '.') { ++_ind; while (_ind < _count && _str[_ind] != ' ') { p = p * 10 + _str[_ind++] - '0'; q *= 10; } }
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return (double)p / q * sign;
        }
    }
    string rs
    {
        get
        {
            _read(); while (_ind < _count && _str[_ind] == ' ') ++_ind;
            var tmp = _str.IndexOf(' ', _ind);
            if (tmp == -1) { _count = 0; _ind = 0; return _str.Substring(_ind); }
            var s = _str.Substring(_ind, tmp - _ind); _ind = tmp + 1;
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return s;
        }
    }

    int[] ria(int n)
    {
        var res = new int[n];
        for (int k = 0; k < n; )
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                int p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    long[] rla(int n)
    {
        var res = new long[n];
        for (int k = 0; k < n; )
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    double[] rda(int n)
    {
        var res = new double[n];
        for (int k = 0; k < n; )
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0, q = 1; while (i < m && s[i] != ' ' && s[i] != '.') p = p * 10 + s[i++] - '0';
                if (i < m && s[i] == '.') { ++i; while (i < m && s[i] != ' ') { p = p * 10 + s[i++] - '0'; q *= 10; } }
                res[k++] = (double)p / q * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    string[] rsa(int n) { var res = new string[n]; for (int k = 0; k < n; ++k) res[k] = Console.ReadLine(); _count = 0; _ind = 0; return res; }
    string _str = null; int _count = 0; int _ind = 0;
    void _read() { if (_ind == _count) { _str = Console.ReadLine(); _count = _str.Length; _ind = 0; } }
    static void Main() { new Program().Solution(); }
}

using System;
using System.Linq;

namespace _633B
{
    class Program
    {
        static void Main()
        {
            var m = long.Parse(Console.ReadLine());
            int counter = 0;
            for (int i = 5; i < 100000; i+=5)
            {
                if (i % 5 == 0)
                {
                    counter+= (int)Math.Log((double)i, 5.0);
                }
                if (counter == m)
                {
                    Console.WriteLine("5");
                    for (int j=0; j < 5; j++)
                    {
                        Console.Write(i++ + " ");
                    }
                    break;
                }
                else if (counter > m)
                {
                    Console.WriteLine("0");
                    break;
                }
            }
        }
    }
}

using System;
using System.Linq;

namespace _633B
{
    class Program
    {
        static void Main()
        {
            var m = long.Parse(Console.ReadLine());
            int counter = 0;
            for (int i = 5; i < 100000; i+=5)
            {
                if (i % 5 == 0)
                {
                    counter+= (int)Math.Log((double)i, 5.0);
                }
                if (counter == m)
                {
                    Console.WriteLine("Yes");
                    for (int j=0; j < 5; j++)
                    {
                        Console.Write(i++ + " ");
                    }
                    break;
                }
                else if (counter > m)
                {
                    Console.WriteLine("No");
                    break;
                }
            }
        }
    }
}