#include #define debug(x) cerr<<#x<<" = "< #define pli pair #define mp make_pair #define pb push_back using namespace std; inline LL read(){ LL nm=0; bool fh=true; char cw=getchar(); for(;!isdigit(cw);cw=getchar()) fh^=(cw=='-'); for(;isdigit(cw);cw=getchar()) nm=nm*10+(cw-'0'); return fh?nm:-nm; } #define mod 1000000007 namespace CALC{ inline int add(int x,int y){return (x+y>=mod)?(x+y-mod):(x+y);} inline int mns(int x,int y){return (x-y<0)?(x-y+mod):(x-y);} inline int mul(LL x,LL y){return x*y%mod;} inline void upd(int &x,int y){x=(x+y>=mod)?(x+y-mod):(x+y);} inline void dec(int &x,int y){x=(x-y<0)?(x-y+mod):(x-y);} inline int qpow(int x,int sq){int res=1;for(;sq;sq>>=1,x=mul(x,x))if(sq&1)res=mul(res,x);return res;} }using namespace CALC; #define M 1000020 LL n; int ans,id1[M],id2[M],mu[M],cnt,g[M]; bool isp[M]; int tot,pri[M]; inline int pr(LL x){x%=mod; return (x&1)?mul((x+1)>>1,x):mul(x>>1,x+1);} inline int calc(LL N){ int &id=(N0) return g[id]; id=++cnt; int las=0,bs; LL r=0,u=0; while(r0) upd(ans,mul(i,calc((n/i)/i))); if(mu[i]<0) dec(ans,mul(i,calc((n/i)/i))); } printf("%d\n",ans),ans=0; } return 0; }