print((function (A, B, C, D) function f(c,r) return c<=A and c*C<=B and c+c*C<=D and f(c+1,r+1) or r end return f end)(io.stdin:read("*n"),io.stdin:read("*n"),io.stdin:read("*n"),io.stdin:read("*n"))(1,0))