import java.util.*;
public class lmml {

	public static void main(String[] args) {
		Scanner sc= new Scanner (System.in);
		double r=sc.nextInt();
		int x=sc.nextInt();
		int y=sc.nextInt();
		int x1=sc.nextInt();
		int y1=sc.nextInt();
		double d1= Math.abs(x-x1);
		double d2= Math.abs(y-y1);
		double  R= (d1+d2)/(2*r);
		int m=(int)R;
if(R-m==0){System.out.println(m);
}else{System.out.println(m+1);}
			}
	}
