#include <iostream>
using namespace std;
long long pow1(long long x,long long y)
{
if(y ==0)
{
return 1;
}
if(y ==1)
{
return x;
}
long long val = pow1(x,y/2);
if(y%2 == 0)
{
return (val*val)%1000000007;
}
else
{
return (val*val*x)%1000000007;
}
}
int main() {
long long n;
cin>>n;
cout<<pow1(2,n)%1000000007<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKbG9uZyBsb25nIHBvdzEobG9uZyBsb25nIHgsbG9uZyBsb25nIHkpCnsKCWlmKHkgPT0wKQoJewoJCXJldHVybiAxOwoJfQoJCglpZih5ID09MSkKCXsKCQlyZXR1cm4geDsKCX0KCQoJbG9uZyBsb25nIHZhbCA9IHBvdzEoeCx5LzIpOwoJaWYoeSUyID09IDApCgl7CgkJcmV0dXJuICh2YWwqdmFsKSUxMDAwMDAwMDA3OwoJfQoJZWxzZQoJewoJCXJldHVybiAodmFsKnZhbCp4KSUxMDAwMDAwMDA3OwoJfQp9CgoKaW50IG1haW4oKSB7CgkKCWxvbmcgbG9uZyBuOwoJY2luPj5uOwoJCgkKCWNvdXQ8PHBvdzEoMixuKSUxMDAwMDAwMDA3PDxlbmRsOwoJCgkKCXJldHVybiAwOwp9