#include const long mod = 1000000007; int main() { long N; long k2[2], k1[2], p1[2]; std::cin >> N; k2[0] = p1[0] = 0; k1[0] = 1; for(int i = 1; i < N; ++i) { k2[1] = k1[0] % mod; k1[1] = p1[0] % mod; p1[1] = (k2[0] + k1[0]) % mod; k2[0] = k2[1]; k1[0] = k1[1]; p1[0] = p1[1]; } std::cout << (k2[0] + k1[0] + p1[0]) % mod << std::endl; return 0; }