a,b,c,d = map(int,input().split()) z = 0 y = 0 while True: if a == 0: print(z) exit(0) a -= 1 if b < c: print(z) exit(0) b -= c y += 1 + c if y > d: print(z) exit(0) z += 1