#include <bits/stdc++.h>
#define fo(a,b,c) for (a=b; a<=c; a++)
#define fd(a,b,c) for (a=b; a>=c; a--)
#define ll long long
//#define file
using namespace std;

int n,i,j,k,l;
ll ans,A,B,C,sum[501],sum2[501];

int main()
{
	#ifdef file
	freopen("a.in","r",stdin);
	#endif
	
	scanf("%d",&n);
	fo(A,1,500)
	{
		fo(B,1,A)
		if (A*B<=500)
		{
			if (A!=B) ++sum[A*B];
		}
		if (A*A<=500) ++sum2[A*A];
	}
	fo(i,1,500) sum[i]+=sum[i-1],sum2[i]+=sum2[i-1];
	
	fo(A,1,n)
	{
		if (A<=500)
		{
			fo(B,1,A)
			if (A*B<=n)
			{
				fo(C,1,B)
				if (A*B*C<=n)
				{
					if (A>B && B>C) ans+=6;
					else
					if (A==B && B==C) ans+=1;
					else ans+=3;
				}
				else break;
			}
		}
		else
		ans+=sum[n/A]*6+sum2[n/A]*3;
	}
	printf("%lld\n",ans);
	
	fclose(stdin);
	fclose(stdout);
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int K;
  int NumberOfUnderK = 0;
  int Multi;
  int m, n, l, n1, l1;
 
  cin >> K;
  for (m = 1; m <= K; m++){
    for (n = 1; n <= K/m; n++){
      for (l = 1; l <= K/n; l++){
        Multi = m * n * l;
         if(Multi <= K){
           NumberOfUnderK++;
         }
         else{
           break;
         }
        
   }
  }
 }
   cout << NumberOfUnderK << endl;
}
