#include<iostream>
#include<algorithm>
using namespace std;	//TLE
int f[1000005];
int m(int x)
{
	int k = 2;
	for (int i = 2; i <= sqrt(x); i++)
	{
		if (x % i == 0)
		{
			if (i != sqrt(x)) k += 2;
			else k += 1;
		}
	}
	return k;
}
int main()
{
	int n;
	f[2] = 1;
	f[3] = 3;
	for (int i = 4; i <= 1000000; i++)
		f[i] = f[i - 1] + m(i - 1);
	while(cin>>n)
		cout << f[n] << endl;
	return 0;
}