#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
using ll = long long;
const ll mod = 1e9 + 7;
ll gcd(ll a, ll b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}

ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  ll n;
  cin >> n;
  ll ans = 1;
  for (ll i = 2; i <= n; ++i) {
    ans = lcm(ans, i);
  }
  cout << ans + 1 << endl;
  return 0;
}

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

int main(){
  long long int N;
  cin >> N;
  N *= 2;
  vector<long long int> div(0);
  for(long long int i=1;i<=sqrt(N);i++){
    if(N%i == 0){
      div.push_back(i);
      if(i*i != N) div.push_back(N/i);
    }
  }
  long long int cnt=0;
  long long int M = div.size();
  for(long long int i=0;i<M;i++){
    if(div[i]%2 == 1) cnt++;
    else if((N/div[i])%2 == 1) cnt++;
  }
  cout << cnt << endl;
}