#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  set<long long> ans;
  for (long long i = 1; i * i <= n; ++i) {
    if (n % i) continue;
    long long s = 0;
    ans.insert((2 * i + (n / i - 1) * i) * n / i / 2 + n / i - n);
    ans.insert((2 * n / i + (i - 1) * n / i) * i / 2 + i - n);
  }
  for (auto i : ans) cout << i << ' ';
}
