#include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
const int INF=int(1e9);
const ll INF64=(ll)(1e18);
const ld EPS=1e-9;
const ld PI=3.1415926535897932384626433832795;
int ans[1000000]={0};
int main(){
int m;
cin>>m;
int check=0;
for(int i=1;i<=500000;++i){
int count=0,j=5;
int n=i;
while(n>0){
count+=n/5;
n/=5;
}
// printf("%d\n",count);
if(count==m)
ans[check++]=i;
}
printf("%d\n",check);
if(check){
for(int i=0;i<check;++i)
printf("%d ",ans[i]);
printf("\n");
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlIDxzeXMvdGltZS5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIGZmIGZpcnN0CiNkZWZpbmUgc3Mgc2Vjb25kCiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgbXAgbWFrZV9wYWlyCgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKdHlwZWRlZiBsb25nIGRvdWJsZSBsZDsKCmNvbnN0IGludCBJTkY9aW50KDFlOSk7CmNvbnN0IGxsIElORjY0PShsbCkoMWUxOCk7CmNvbnN0IGxkIEVQUz0xZS05Owpjb25zdCBsZCBQST0zLjE0MTU5MjY1MzU4OTc5MzIzODQ2MjY0MzM4MzI3OTU7CgppbnQgYW5zWzEwMDAwMDBdPXswfTsKCmludCBtYWluKCl7CgogICAgaW50IG07CgogICAgY2luPj5tOwoKICAgIGludCBjaGVjaz0wOwoKICAgIGZvcihpbnQgaT0xO2k8PTUwMDAwMDsrK2kpewoKICAgICAgICAgaW50IGNvdW50PTAsaj01OwoKICAgICAgICAgaW50IG49aTsKIAogICAgICAgICB3aGlsZShuPjApewogCiAgICAgICAgICAgICBjb3VudCs9bi81OwogICAgICAgICAgICAgbi89NTsKICAgICAgICAgICAKICAgICAgICAgfQoKICAgICAgLy8gICBwcmludGYoIiVkXG4iLGNvdW50KTsKCiAgICAgICAgIGlmKGNvdW50PT1tKQogICAgICAgICAJIGFuc1tjaGVjaysrXT1pOwoKICAgIH0KCiAgICBwcmludGYoIiVkXG4iLGNoZWNrKTsKCiAgICBpZihjaGVjayl7CgogICAgICBmb3IoaW50IGk9MDtpPGNoZWNrOysraSkKICAgIAlwcmludGYoIiVkICIsYW5zW2ldKTsKICAgIAoKICAgICAgcHJpbnRmKCJcbiIpOwoKCiAgICB9CglyZXR1cm4gMDsKCn0=