p, d, m, s = input().strip().split(' ') p, d, m, s = [int(p), int(d), int(m), int(s)] gameCount=0 while(s>=0): if (p>=m): s=s-p p=p-d gameCount+=1 else: s=s-m gameCount+=1 if (s<0): print (gameCount-1) else: print (gameCount)