#include using namespace std; int main() { int n; long long x, a, b; cin >> n >> x >> a >> b; long long y = (1LL << (n - 1)); // cout << y << ", " << y - x << ", " << y - x + b - 1 << endl; long long ans = min( (x + a - 1) / a, (y - x + b - 1) / b ); cout << ans << endl; return 0; }