#include using namespace std; typedef long long ll; int main() { ll n; cin >> n; ll dp[n+1][4],mod=1000000007; memset(dp,0,sizeof(dp)); dp[0][0]=1; for(int i=0; i