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