#include #include using namespace std; int main() { long long a,b,k,c, out = 0; cin>>a>>b>>k>>c; if(a==c || b==c) { out = (pow(2, k)*k)/2; } cout<