#include int main() { int n; std::cin >> n; if (n == 2) { std::cout << 1 << std::endl; return 0; } long long result = n; for (int i = 0; i < n - 3; i++) { result = (result * 2) % 1000000007ll; } std::cout << result << std::endl; return 0; }