import java.util.Scanner;
public class lmml {

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