d = input() H = [] for i in range(3): H.append(input()) ans = 0 if H[0] == H[2]: if H[0] < d: print(-1) quit() else: H[0] -= 0 ans += 1 def upward(): if H[1] == 0: return None d0 = H[0] - H[1] d2 = H[2] - H[1] return max(d0/d, d2/d, -1) + 1 def downward(): if H[0] * H[2] == 0: return None return max((H[1] - min(H[0], H[2]))/d, -1) + 1 if min(upward(), downward()) is None: print(-1) else: print(ans + min(upward(), downward()))