#In the name of Allah

from sys import stdin, stdout
input = stdin.readline

r, x, y, _x, _y = map(int, input().split())

stp = r * 2

from math import ceil
ans = ceil((abs(x - _x) + abs(y - _y)) / stp)
stdout.write(str(ans))
