#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <iomanip>
#include <random>
#include <climits>
#include <set>
#include <map>

using namespace std;


/*

*/





int main() {

	int n;
	cin >> n;

	int i = 1;
	int sum = 0;

	while (1) {

		sum += i;

		if (sum >= n) {
			cout << i << endl;
			break;
		}

		i++;

	}




	return 0;
}
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vii;
ll n;
int main()
{
	cin>>n;
	n*=2LL;
	int ans=0;
	for(ll i=1LL;i*i<=n;i++)
	{
		if(n%i==0LL)
		{
			ll j=n/i;
			if((i%2LL)==(j%2LL)) continue;
			ans+=2;
		}
	}
	cout<<ans<<endl;
	return 0;
}
