condition = list(input().split()) vegitable = int(condition[0]) origin_meet = int(condition[1]) rate = int(condition[2]) origin_all = int(condition[3]) if vegitable * rate <= origin_meet: i = vegitable else: for i in range(vegitable): meet = (i+1) * rate if (meet > origin_meet): break all = (i+1) + meet if (all > origin_all): break print(i)