#include using namespace std; typedef long long ll; typedef pair P; typedef pair P1; typedef pair P2; #define pu push #define pb push_back #define mp make_pair #define eps 1e-7 #define INF 1000000000 #define mod 1000000007 #define fi first #define sc second #define rep(i,x) for(int i=0;ivec[100005]; int cnt = 0; #define mod 1000000007 ll modpow(ll x,ll n) { ll res=1; while(n>0) { if(n&1) res=res*x%mod; x=x*x%mod; n>>=1; } return res; } int main(){ cin>>n; n%=mod; ll x[15]; x[0]=1; for(int i=1;i<15;i++)x[i]=x[i-1]*1LL*n%mod; ll ans = x[1]*(x[10]-15LL*x[8]+6LL*x[7]+50LL*x[6]-26LL*x[5]-39LL*x[4]+36LL*x[3]-4LL*x[2]-4LL*x[1]+1LL)%mod; ll ans2 = (x[6]+2LL*x[5]-9LL*x[4]-5LL*x[3]+15LL*x[2]-8LL*x[1]+1LL)%mod; ans2 *= (x[6]+2LL*x[5]-7LL*x[4]-3LL*x[3]+7LL*x[2]-4LL*x[1]+1LL)%mod; ans2%=mod; cout<<(ans*modpow(ans2,mod-2)%mod+mod)%mod<>n; if(n<=11){cout<>k)&1LL)) continue; ll b[12]={}; for(int j=0;j<12;j++)for(int x=0;x<12;x++){ b[j] = (b[j]+pat[j][x][k]*a[x])%mod; } for(int j=0;j<12;j++) a[j]=b[j]; } cout<<(a[11]%mod+mod)%mod<