<reponame>panch-1/Codeforces_Solutions
import sys,math,io,os,time,itertools,collections
mod=10**9+7
sys.setrecursionlimit(10000)
i=sys.stdin.readline
#use sys.stdout.write() (remember to convert to str b4 and concatenate "\n")
global start,end

#binary search
def isin(l,x):
    left=0
    right=len(l)-1
    while left<=right:
        mid=left+(right-left)//2
        if l[mid]==x:
            return True,mid
        elif l[mid]<x:
            left=mid+1
        else:
            right=mid-1
    return False,-1

def no5(n):
    k=0
    while n%5==0:
        k+=1
        n//=5
    return k

def main():
    m=int(i())
    l=[]
    tot=0
    for k in range(1,10**5+1):
        tot+=no5(k)+1
        l.append(tot)
    bool,ind=isin(l,m)
    if bool:
        print(5)
        s=5*(ind+1)
        print(s,s+1,s+2,s+3,s+4)
    else:
        print(0)

t=1
#t=int(i())
start=time.perf_counter()
for _ in range(t):
    main()
end=time.perf_counter()
#print(end-start)
import sys,math,io,os,time,itertools,collections
mod=10**9+7
sys.setrecursionlimit(10000)
i=sys.stdin.readline
#use sys.stdout.write() (remember to convert to str b4 and concatenate "\n")
global start,end

#binary search
def isin(l,x):
    left=0
    right=len(l)-1
    while left<=right:
        mid=left+(right-left)//2
        if l[mid]==x:
            return True,mid
        elif l[mid]<x:
            left=mid+1
        else:
            right=mid-1
    return False,-1

def no5(n):
    k=0
    while n%5==0:
        k+=1
        n//=5
    return k

def main():
    m=int(i())
    l=[]
    tot=0
    for k in range(1,10**5+1):
        tot+=no5(k)+1
        l.append(tot)
    bool,ind=isin(l,m)
    if bool:
        print(5)
        s=5*(ind+1)
        print(s,s+1,s+2,s+3,s+4)
    else:
        print(0)

t=1
#t=int(i())
start=time.perf_counter()
for _ in range(t):
    main()
end=time.perf_counter()
#print(end-start)
#use sys.stdout.write() (remember to convert to str b4 and concatenate "\n") #binary search #t=int(i()) #print(end-start)