#include using namespace std; #define MOD (1000000000+7) int main() { int N; cin >> N; int bS, bK1, bK2; int aS, aK1, aK2; bS = 1; bK1 = 0; bK2 = 0; for( int i = 1; i <= N; i++ ) { aS = bK1 + bK2; aK1 = bS ; aK2 = bK1; aS = aS%MOD; aK1 = aK1%MOD; aK2 = aK2%MOD; bS = aS; bK1 = aK1; bK2 = aK2; // cout << "hoge" << endl; } cout << (aS+bK1+bK2)%MOD << endl; return 0; }