#include<bits/stdc++.h>
using namespace std;

int main(){
  int64_t n;
  cin>>n;
  vector<int>ans(n+1,1);
  for(int i=1;i<=n;i++){
    for(int j=i*2;j<=n;j+=i){
      ans[j]=max(ans[j],ans[i]+1);
    }
  }
  for(int i=1;i<=n;i++)cout<<ans[i]<<' ';puts("");
}
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iostream>
#include <sstream>
#include <numeric>
#include <map>
#include <set>
#include <queue>
#include <vector>

using namespace std;

typedef long long LL;

LL solve(long long N) {
	LL N2 = N * 2, ans = 0;
	for (LL i = 1; i * i <= N2; ++i) {
		LL sum = (i * (i - 1)) / 2;
		ans += (abs(N - sum) % i) == 0;
	}
	return ans * 2;
}

int main() {
    long long N;
	std::cin >> N;
	cout << solve(N) << endl;
	return 0;
}
