a, b, c, d = map(int, input().split(' ')) total = 0 cnt = 0 while(True): if a == 0 or b == 0: break total += c + 1 a -= 1 b -= c if total > d: break if not (b < 0): cnt += 1 print(cnt)