import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader teclado = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer linea = new StringTokenizer(teclado.readLine());
		int r=Integer.parseInt(linea.nextToken());
		int x=Integer.parseInt(linea.nextToken());
		int y=Integer.parseInt(linea.nextToken());
		int xP=Integer.parseInt(linea.nextToken());
		int yP=Integer.parseInt(linea.nextToken());
		
		double distance = Math.sqrt(Math.pow((Math.abs(x)+Math.abs(xP)),2)+Math.pow((Math.abs(y)+Math.abs(yP)),2))-(r*2);
		
		distance=distance/(r*2);
		distance= Math.abs(distance);
		if (x==xP&&y==yP) {
			System.out.println("0");
		}
		
		else if(distance==0) {
			System.out.println("1");
		}
		
		else {
			
		System.out.println((distance < 1) ? "2" : (int)Math.ceil(distance));
	}}

}
// 2 0 0 0 4
//4 1 1 4 4 = 2
	  				  					 	 				  	   			