#include #include #include #include using namespace std; using ll = long long int; #define mod 1000000007 int main(){ ll n ; cin >> n; if(n==2){ cout << 1 << endl; return 0; } ll powered = 1; for (int i = 0; i < n - 3; ++i) { powered <<= 1; powered = powered % mod; } ll tmp =static_cast (powered * n); ll res = ( tmp ) % mod ; cout << res << endl; return 0; }