#In the name of Allah

from sys import stdin, stdout
input = stdin.readline

r, x, y, x2, y2 = map(int, input().split())

from math import ceil

ans = ceil((abs(x - x2) + abs(y - y2)) / 2 / r)

stdout.write(str(ans))
