def amr_pins():
    r, sx, sy, fx, fy = map(int, raw_input().strip().split())
    print (abs(fx - sx) + abs(fy - sy)) / (2 * r)
    # print (((fx - sx) ** 2 + (fy - sy) ** 2) ** 0.5) / (2 * r)

amr_pins()