#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { int N,X,A,B; cin >> N >> X >> A >> B; A = ( X/A )+( X%A ? 1 : 0 ); B = ((1<<(N-1))-X)/B + ( ((1<