#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vvi; #define rep(i,n) for(ll i=0;i<(n);i++) #define pii pair #define piii pair #define mp make_pair #define pb push_back #define ALL(a) (a).begin(),(a).end() #define FST first #define SEC second const int INF = (INT_MAX/2); const ll LLINF = (LLONG_MAX/2); const double eps = 1e-14; const double PI = M_PI; #define DEB cout<<"!"< Array; typedef vector matrix; // O( n ) matrix identity(int n) { matrix A(n, Array(n)); for (int i = 0; i < n; ++i) A[i][i] = 1; return A; } // O( n^2 ) Array mul(const matrix &A, const Array &x,ll div) { Array y(A.size()); for (int i = 0; i < A.size(); ++i) for (int j = 0; j < A[0].size(); ++j) y[i] = A[i][j] * x[j] % div; return y; } // O( n^3 ) matrix mul(const matrix &A, const matrix &B,ll div) { matrix C(A.size(), Array(B[0].size())); for (int i = 0; i < C.size(); ++i) for (int j = 0; j < C[i].size(); ++j) for (int k = 0; k < A[i].size(); ++k) C[i][j] += A[i][k] * B[k][j] % div; return C; } // O( n^3 log e ) matrix pow(const matrix &A, ll e, ll div) { return e == 0 ? identity(A.size()) : e % 2 == 0 ? pow(mul(A, A,div),e/2,div) : mul(A, pow(A, e-1,div),div); } int main(){ ll i; cin >> i; matrix fib(2,Array(2)); fib = {{1,1},{0,100}}; Array ini(2); ini = {1,1}; fib = pow(fib,i,1000000007); ini = mul(fib,ini,1000000007); cout << ini[0] << endl; fib ={{1,1},{0,100}}; ini = {1,1}; if(i >= 11) i %= 11; fib = pow(fib,i,LLONG_MAX/2); ini = mul(fib,ini,LLONG_MAX/2); cout << ini[0] << endl; }