#include #include #include using namespace std; int main() { int n, x, a, b; cin >> n >> x >> a >> b; int max_h = pow(2, n - 1); int y = max_h - x; x = (x / a) + ((x % a) != 0); y = (y / b) + ((y % b) != 0); cout << min(x, y) << endl; return 0; }