#include "bits/stdc++.h" #define Rep(i,n) for(int i=0;i> a(n,vector(m,0)); using namespace std; typedef long long ll; typedef pair P; template inline bool chmax(T& a, T b) {if(a inline bool chmin(T& a, T b) {if(a>b){a=b;return 1;}return 0;} int n; ll MOD = 1e9+7; ll rec(int n,ll sum=1){ if(n==0){ return sum; } return (rec(n-1,sum)*10+3)%MOD; } int main(){ cin >> n; put(rec(n)); return 0; }