//package intro_basic;

import java.util.Scanner;

public class geometry_circle {
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int r,x1,y1,x2,y2;
		r=sc.nextInt();
		x1=sc.nextInt();
		y1=sc.nextInt();
		x2=sc.nextInt();
		y2=sc.nextInt();
		
		int ans=0,mod=0;
		ans+=Math.abs((x2-x1))/(2*r);
		mod+=Math.abs((x2-x1))%(2*r);
		ans+=Math.abs((y2-y1))/(2*r);
		mod+=Math.abs((y2-y1))%(2*r);
		if(mod!=0)
		{
			ans+=1;
		}
		System.out.println(ans);
	}
}
