package net.ipipip0129.yukicoder.no598; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long bit_len = Long.parseLong(scan.nextLine()); long enemy_hp = Long.parseLong(scan.nextLine()); long attack_point = Long.parseLong(scan.nextLine()); long heal_point = Long.parseLong(scan.nextLine()); long overflow_point = (long) (Math.pow(2,bit_len - 1) - enemy_hp); long attack_cnt = enemy_hp / attack_point; if (enemy_hp % attack_point != 0) attack_cnt += 1; long heal_cnt = overflow_point / heal_point; if (overflow_point % heal_point != 0) heal_cnt += 1; System.out.println(Math.min(attack_cnt, heal_cnt)); } }