#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 1000000 #define MOD 1000000007 #define INF 1000000000 ll modpow(ll a,ll n,ll mod){ a%=mod; ll ret=1; while(n>0){ if(n%2==1){ ret=ret*a%mod; } a=a*a%mod; n/=2; } return ret; } int main(){ ll A,B,C,K; cin>>A>>B>>C>>K; ll x=(A*B%MOD)*C%MOD; ll k=modpow(2,K,MOD-1); k%=(MOD-1); cout<