d = input() H = [] for i in range(3): H.append(input()) 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 ans = min(upward(), downward()) if ans is None: print(-1) else: print(ans)