#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main()
{
	int n,x;
	cin>>n;
	int l=1,r=2e9;
	while(r-l>1)
	{
		int m=l+r>>1;
		if(m*(m+1)/2<=n+1)
			l=m;
		else
			r=m;
	}
	cout<<n-l+1<<endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int main()
{
    int K;
    cin >> K;
    ll ans = 0;
    for (int i = 1; i <= K; i++)
    {
        int jEnd = K / i;
        for (int j = i; j <= jEnd; j++)
        {
            int p = K / (i * j);
            if (p < j)
                break;
            if (i == j)
                ans += 1 + (p - i) * 3;
            else
                ans += 3 + (p - j) * 6;
        }
    }
    cout << ans;
    return 0;
}
