import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader bf =  new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader bf =  new BufferedReader(new FileReader("p.txt"));
		
		StringTokenizer tk = new StringTokenizer(bf.readLine());
		
		double r = Double.parseDouble(tk.nextToken());
		double x = Double.parseDouble(tk.nextToken());
		double y = Double.parseDouble(tk.nextToken());
		double X = Double.parseDouble(tk.nextToken());
		double Y = Double.parseDouble(tk.nextToken());
		System.out.printf("%.0f",Math.ceil(Math.hypot(diff(x, X), diff(y, Y))/(2*r)));
			
	}
	
	static double diff(double a, double b) {
		
		if(a==b) return 0;
		if((a>=0)&&(b>=0)) {
			if (a>b) return a-b;
			if (b>a) return b-a;
		}else if((a<0)&&(b<0)) {
			a*=-1;
			b*=-1;
			if (a>b) return a-b;
			if (b>a) return b-a;
		}else {
			if(a<0) return (a*-1)+b;
			if(b<0) return (b*-1)+a;
		}
		return 0;
	}
	
}
