#include using namespace std; int main(){ int n; cin >> n; static long long int c[1000000][3]; c[0][0] = 1; c[0][1] = 0; c[0][2] = 0; c[1][0] = 0; c[1][1] = 1; c[1][2] = 0; for (int i = 1; i <= n; i++){ c[i][0] = (c[i - 1][1] + c[i - 1][2]) % 1000000007; c[i][1] = c[i - 1][0] % 1000000007; c[i][2] = c[i - 1][1] % 1000000007; } cout << (c[n][0] + c[n][1] + c[n][2]) % 1000000007 << endl; return 0; }