import sys, math N, X, A, B = map(int, sys.stdin.readlines()) print(min(math.ceil(X/A), math.ceil((2**(N-1)-X)/B)))