N, M, P, Q = map(int, input().split()) res = 0 while True: for i in range(1, 13): res += 1 if P <= i < P + Q: N -= 2 * M else: N -= M if N <= 0: print(res) break else: continue break