d = int(input()) hl = [int(input()) for i in range(3)] # 3 3 4 or 3 3 2 if hl[1] == hl[0] or hl[1] == hl[2]: # 0 0 2 NG print(1 if hl[1] > 0 else -1) exit(0) # 5 7 5 or 2 0 1 if max(hl) == hl[1] or min(hl) == hl[1]: print(0) exit(0) midx = hl.index(max(hl)) print((hl[midx] - hl[1]) // d + (0 if (hl[midx] - hl[1]) % d != 0 else 1))