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