#B. Amr and Pins: http://codeforces.com/contest/507/problem/B
from sys import stdin, stdout
import math

def main():
	r, x1, y1, x2, y2 = map(int, stdin.readline().split())
	d = math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))
	res = math.floor(d / r)
	# Special Case: res <= 2
	if res == 0:
		print 0
	elif res <= 2:
		print 1
	else:
		print int(res) - 1			
main()

