#include <bits/stdc++.h>
using namespace std;
using LL=long long;
using ULL=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

int K;
LL dp[4][200001];

int main(){
  cin>>K;
  rep(t,4) rep(i,K+1) dp[t][i]=0;
  dp[0][1]=1;
  rep(t,3) for(int i=1; i<=K; i++)
    for(int j=i; j<=K; j+=i) dp[t+1][j]+=dp[t][i];
  LL ans=0;
  rep(i,K+1) ans+=dp[3][i];
  cout<<ans<<endl;
  return 0;
}


#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
set<int>s;
signed main(){
	cin>>n;
	for(int i=2;i*i<=n;i++){
		if(s.count(i))continue;
		int t=i*i;
		while(t<=n)s.insert(t),t*=i;
	}
	cout<<n-s.size();
	return 0;
}