#include<iostream>
#include<cstdio>
#include<cmath>
#define Ll long long
using namespace std;
const int M=1e8;
int q[5761456],tot;
bool com[M+5];
int n,mo=1000000007;
Ll ans,x;
void findcom(){
com[1]=1;
for(int i=2;i<=n;i++){
if(!com[i]){q[++tot]=i;}
for(int j=1;j<=tot;j++){
if(i*q[j]>n)break;
com[i*q[j]]=1;
if(i%q[j]==0)break;
}
}
}
int main(){
scanf("%d",&n);
findcom();
ans=1;
for(int i=1;i<=tot;i++){
x=q[i];
if(x>n)break;
while(x*q[i]<=n)x*=q[i];
ans=ans*x;
if(ans>=mo)ans%=mo;
}
printf("%d",int(ans));
}