#include <iostream>
#include <vector>
using namespace std;
int n, m;
int two, five;
int main() {
cin >> m;
vector<int> v;
for (int i = 1; ; i++)
int t = i;
// 统计因子 2 的个数
while (t % 2 == 0) two++, t /= 2;
// 统计因子 5 的个数
while (t % 5 == 0) five++, t /= 5;
if (min(two, five) == m) v.push_back(i);
if (min(two, five) > m) break;
}
cout << v.size() << endl;
for (int x : v) cout << x << ' ';
return 0;
}