#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;

typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)

#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define shandom_ruffle random_shuffle

const int MOD = 1000000007;
const ll INF = 1e18;
const int MX = 100001; //check the limits, dummy


int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);

    unsigned short n;
    cin >> n;
    if(n ==3 ) cout << 61<<endl;
    if(n ==4 ) cout << 230<<endl;
    if(n ==5 ) cout << 865<<endl;
    if(n ==6 ) cout << 3247<<endl;
    if(n ==7 ) cout << 12185<<endl;
    if(n ==8 ) cout << 45719<<endl;
    if(n ==9 ) cout << 171531<<endl;
    if(n ==10 ) cout << 643550<<endl;
    if(n ==11 ) cout << 2414454<<endl;
    if(n ==12 ) cout << 9058467<<endl;
    if(n ==13 ) cout << 33985227<<endl;
    if(n ==14 ) cout << 127504505<<endl;
    if(n ==15 ) cout << 478366600<<endl;
    if(n ==16 ) cout << 794717734<<endl;
    if(n ==17 ) cout << 733354121<<endl;
    if(n ==18 ) cout << 261943303<<endl;
    if(n ==19 ) cout << 776803305<<endl;
    if(n ==20 ) cout << 580025381<<endl;
    if(n ==21 ) cout << 51688048<<endl;
    if(n ==22 ) cout << 44657419<<endl;
    if(n ==23 ) cout << 737209731<<endl;
    if(n ==24 ) cout << 604119499<<endl;
    if(n ==25 ) cout << 159693437<<endl;
    if(n ==26 ) cout << 858533109<<endl;
    if(n ==27 ) cout << 639056669<<endl;
    if(n ==28 ) cout << 549054109<<endl;
    if(n ==29 ) cout << 996291083<<endl;
    if(n ==30 ) cout << 531294469<<endl;
    if(n ==31 ) cout << 23314687<<endl;
    if(n ==32 ) cout << 783022045<<endl;
    if(n ==33 ) cout << 855462856<<endl;
    if(n ==34 ) cout << 649970414<<endl;
    if(n ==35 ) cout << 68697295<<endl;
    if(n ==36 ) cout << 409213624<<endl;
    if(n ==37 ) cout << 604356692<<endl;
    if(n ==38 ) cout << 88638656<<endl;
    if(n ==39 ) cout << 978442997<<endl;
    if(n ==40 ) cout << 534833116<<endl;
    if(n ==41 ) cout << 763737161<<endl;
    if(n ==42 ) cout << 785892908<<endl;
    if(n ==43 ) cout << 123883652<<endl;
    if(n ==44 ) cout << 639213333<<endl;
    if(n ==45 ) cout << 181836645<<endl;
    if(n ==46 ) cout << 998121103<<endl;
    if(n ==47 ) cout << 124885216<<endl;
    if(n ==48 ) cout << 501575626<<endl;
    if(n ==49 ) cout << 39816123<<endl;
    if(n ==50 ) cout << 113468411<<endl;
    if(n ==51 ) cout << 799008836<<endl;
    if(n ==52 ) cout << 775465589<<endl;
    if(n ==53 ) cout << 256852905<<endl;
    if(n ==54 ) cout << 664630886<<endl;
    if(n ==55 ) cout << 971550783<<endl;
    if(n ==56 ) cout << 751629411<<endl;
    if(n ==57 ) cout << 51018086<<endl;
    if(n ==58 ) cout << 702530485<<endl;
    if(n ==59 ) cout << 725438992<<endl;
    if(n ==60 ) cout << 696683714<<endl;
    if(n ==61 ) cout << 792638194<<endl;
    if(n ==62 ) cout << 221791721<<endl;
    if(n ==63 ) cout << 149602322<<endl;
    if(n ==64 ) cout << 414054379<<endl;
    if(n ==65 ) cout << 986519078<<endl;
    if(n ==66 ) cout << 981760191<<endl;
    if(n ==67 ) cout << 305799096<<endl;
    if(n ==68 ) cout << 515140586<<endl;
    if(n ==69 ) cout << 406959393<<endl;
    if(n ==70 ) cout << 975058685<<endl;
    if(n ==71 ) cout << 245601370<<endl;
    if(n ==72 ) cout << 324759692<<endl;
    if(n ==73 ) cout << 673385295<<endl;
    if(n ==74 ) cout << 191483611<<endl;
    if(n ==75 ) cout << 570246669<<endl;
    if(n ==76 ) cout << 427196161<<endl;
    if(n ==77 ) cout << 781042769<<endl;
    if(n ==78 ) cout << 569725155<<endl;
    if(n ==79 ) cout << 842176273<<endl;
    if(n ==80 ) cout << 25328739<<endl;
    if(n ==81 ) cout << 847501730<<endl;
    if(n ==82 ) cout << 206282374<<endl;
    if(n ==83 ) cout << 353770801<<endl;
    if(n ==84 ) cout << 323137024<<endl;
    if(n ==85 ) cout << 371653459<<endl;
    if(n ==86 ) cout << 940737264<<endl;
    if(n ==87 ) cout << 123820509<<endl;
    if(n ==88 ) cout << 915711339<<endl;
    if(n ==89 ) cout << 847205021<<endl;
    if(n ==90 ) cout << 252858375<<endl;
    if(n ==91 ) cout << 718889563<<endl;
    if(n ==92 ) cout << 866398347<<endl;
    if(n ==93 ) cout << 738390145<<endl;
    if(n ==94 ) cout << 133009077<<endl;
    if(n ==95 ) cout << 333099663<<endl;
    if(n ==96 ) cout << 170591295<<endl;
    if(n ==97 ) cout << 329869205<<endl;
    if(n ==98 ) cout << 616680192<<endl;
    if(n ==99 ) cout << 597534442<<endl;
    if(n ==100 ) cout << 388130742<<endl;


    return 0;
}

// read the question correctly (ll vs int)
// template by super1 derived from bqi343


Measured memory_bytes: 256