#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 = max(abs(x - x2), abs(y - y2)) / 2 / r

stdout.write(str(ceil(ans)))
