#includeusingnamespacestd;
typedeflonglong LL;
int p=2097151;
longlong n;
LL quick_mod(LL a, LL b)
{
LL ans = 1;
a %= p;
while(b)
{
if(b & 1)
{
ans = ans * a % p;
b--;
}
b >>= 1;
a = a * a % p;
}
return ans;
}
int main()
{
while(~scanf("%lld",&n))
{
LL ans=quick_mod(2,n)-1;
ans*=2;
ans%=p;
printf("%lld
",ans);
}
}