n = input() hp = input() attack = input() heal = input() def kill_by_attack(hp,attack): time = 0 while True: if(hp < 0): return time hp -= attack time += 1 def kill_by_heal(n,hp,heal): time = 0 over_flow_hp = 2 ** n - 2 ** (n - 1) - 1 while True: if(hp > over_flow_hp): return time hp += heal time += 1 print min(kill_by_attack(hp,attack),kill_by_heal(n,hp,heal))