#include #include #include using namespace std; using ll = long long; #include using mint = atcoder::modint1000000007; ll mpow(ll n,ll k,ll mod){ ll a = 1; while(k){ if(k&1) a = (a*n) % mod; n = (n*n) % mod; k >>= 1; } return a; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll a,b,c; cin>>a>>b>>c; ll k; cin>>k; ll use = mpow(2,k,1000000006); mint ans = mint(a) * mint(b) * mint(c); ans = ans.pow(use); cout<