#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<=50000;++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+CiNpbmNsdWRlIDxzeXMvdGltZS5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIGZmIGZpcnN0CiNkZWZpbmUgc3Mgc2Vjb25kCiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgbXAgbWFrZV9wYWlyCgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKdHlwZWRlZiBsb25nIGRvdWJsZSBsZDsKCmNvbnN0IGludCBJTkY9aW50KDFlOSk7CmNvbnN0IGxsIElORjY0PShsbCkoMWUxOCk7CmNvbnN0IGxkIEVQUz0xZS05Owpjb25zdCBsZCBQST0zLjE0MTU5MjY1MzU4OTc5MzIzODQ2MjY0MzM4MzI3OTU7CgppbnQgYW5zWzEwMDAwMDBdPXswfTsKCmludCBtYWluKCl7CgogICAgaW50IG07CgogICAgY2luPj5tOwoKICAgIGludCBjaGVjaz0wOwoKICAgIGZvcihpbnQgaT0xO2k8PTUwMDAwOysraSl7CgogICAgICAgICBpbnQgY291bnQ9MCxqPTU7CgogICAgICAgICBpbnQgbj1pOwogCiAgICAgICAgIHdoaWxlKG4+MCl7CiAKICAgICAgICAgICAgIGNvdW50Kz1uLzU7CiAgICAgICAgICAgICBuLz01OwogICAgICAgICAgIAogICAgICAgICB9CgogICAgICAvLyAgIHByaW50ZigiJWRcbiIsY291bnQpOwoKICAgICAgICAgaWYoY291bnQ9PW0pCiAgICAgICAgIAkgYW5zW2NoZWNrKytdPWk7CgogICAgfQoKICAgIHByaW50ZigiJWRcbiIsY2hlY2spOwoKICAgIGlmKGNoZWNrKXsKCiAgICAgIGZvcihpbnQgaT0wO2k8Y2hlY2s7KytpKQogICAgCXByaW50ZigiJWQgIixhbnNbaV0pOwogICAgCgogICAgICBwcmludGYoIlxuIik7CgoKICAgIH0KCXJldHVybiAwOwoKfQ==