import java.util.Scanner; public class No598 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int X = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); int MAX =(int)Math.pow(2, N-1); System.out.println((int)Math.min(Math.ceil((double)X/A),Math.ceil((double)(MAX-X)/B))); } }