#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<0) { dp[i+1][0] += dp[i][j]; dp[i+1][0]%=mod; } } } REP(j,0,3){ ans += dp[N][j]; ans%=mod; } printf("%lld\n", ans); return 0; }