#include<cstdio>
#define mod 100000007
#define maxn 20000
using namespace std;
int p[maxn+100]={0};
void Euler(){
for (int i=1;i<=maxn;i++) p[i]=i;
for (int i=2;i<=maxn;i++) if (p[i]==i){
for (int j=i;j<=maxn;j+=i){
p[j]=p[j]/i*(i-1);
}
}
return;
}
int main(){
freopen("msta.in","r",stdin);
freopen("msta.out","w",stdout);
Euler();
int n;
long long ans=1;
scanf("%d",&n);
for (int i=1;i<=n;i++){
ans=(ans*p[i])%mod;
}
printf("%d",ans);
return 0;
}