Subject to the effect:
Problem-solving ideas:
Can be found, the summit must be n, so consider were placed n the left or right, so the only draw the appropriate answer. So the answer is, . Then find the answer quickly enough power
#include<cstdio>
using namespace std;
const long long ymw = 1e9 + 7;
long long n;
long long ksm(long long x, long long m) {
long long ans = 1;
while (m) {
if (m & 1) (ans*=x) %= ymw;
(x*=x) %= ymw;
m >>= 1;
}
return ans;
}
int main() {
scanf("%lld", &n);
printf("%lld",ksm(2, n-1) % ymw);
}