from math import ceil

def INPUT():
    return [int(x) for x in input().split(' ')]

def main():
    r, x1, y1, x2, y2 = INPUT()

    dis = abs(x1 - x2) + abs(y1 - y2)

    ans = ceil(dis/2.0) / r

    print(ceil(ans))

if __name__=="__main__":
    main()
