#include<iostream>
#include<algorithm>
#include<cstdio>
typedef long long ll;
const ll mod=1e9+7;
using namespace std;
long long n, p[340000], v[340000];
void solve()
{
long long i,j,m;
for(m=1; m*m<=n; ++m)
p[m] = n/m-1;
for(i=1; i<=m; ++i)
v[i] = i-1;
for(i=2; i<=m; ++i)
{
if(v[i] == v[i-1]) continue;
for(j=1; j<=min(m-1,n/i/i); ++j)
if(i*j < m) p[j] -= p[i*j]-v[i-1];
else p[j] -= v[n/i/j]-v[i-1];
for(j=m; j>=i*i; --j)
v[j] -= v[j/i]-v[i-1];
}
}
ll qpow (ll a,ll b)
{
ll ans=1;
while(b)
{
if(b&1)
{
ans=(a*ans)%mod;
}
a=(a*a)%mod;
b>>=1;
}
return ans;
}
int main()
{
cin>>n;
cout<<p[1];
return 0;
}