#include<bits/stdc++.h>
using namespace std;
int main() {
	long n;
	cin>>n;
	set<long> ans;
	for(long d=1;d*d<=n;d++) {
		if(n%d==0) {
			ans.insert(d);
			ans.insert(n/d);
		}
	}
	for(auto x:ans) cout<<x<<endl;
}
#include<bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i) 
#define rrep(i, a, b) for (ll i = (a); i < (b); ++i)
#define PI acos(-1)
#define pcnt __builtin_popcountll
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define sz(x) (int)(x).size()
#define v(T) vector<T>
#define vv(T) v(v(T))
#define fi first
#define se second

using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using LP = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using tl = tuple<ll, ll, ll>;

template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) {if (a > b) { a = b; return true; } return false; }

ll INF = 1001001001;
ll LINF = 1001001001001001001ll;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll n; cin>>n;
    map<ll, ll> mp;
    rrep(i, 2, n + 1) {
        ll temp = i;
        for (ll j = 2; j * j <= temp; ++j) {
            ll cur = 0;
            while (temp % j == 0) {
                cur++;
                temp /= j;
            }
            chmax(mp[j], cur);
        }
        chmax(mp[temp], 1ll);
    }
    ll ans = 1;
    for (auto p : mp) {
        rep(i, p.se) ans *= p.fi;
    }
    cout<<ans + 1<<endl;
}