Loading Similar Posts
#include <bits/stdc++.h>
using namespace std;
#define int long long
int mod = 1e9 + 7;
int power(int x, int y)
{
int z = 1;
x = x % mod;
while (y > 0)
{
if (y & 1)
z = (z * x) % mod;
y = y >> 1;
x = (x * x) % mod;
}
return z;
}
bool isPrime(int n)
{
for (int i = 2; i * i <= n; ++i)
{
if (n % i == 0)
{
return false;
}
}
return true;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int check = (n * (n - 1)) / 2;
int ans = power(2, check);
cout << ans << "\n";
return 0;
}