#include <bits/stdc++.h>
using namespace std;
long long int m;
const int maxn = 100100;
long long int arr[maxn];
int k = 0;
int main() {
  cin >> m;
  for (long long int i = 0; i < 1000000; i++) {
    long long int sk = i;
    long long int cur = 5;
    int cnt = 0;
    while (1) {
      sk /= cur;
      if (sk == 0) {
        break;
      }
      cnt += sk;
      sk = i;
      cur *= 5;
    }
    if (cnt == m) {
      arr[k++] = i;
    }
  }
  cout << k << endl;
  for (int i = 0; i < k; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
  return 0;
}
