/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public final class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s1[] = br.readLine().split(" ");
		double r = Integer.parseInt(s1[0]);
		double x = Integer.parseInt(s1[1]);
		double y = Integer.parseInt(s1[2]);
		double x1 = Integer.parseInt(s1[3]);
		double y1 = Integer.parseInt(s1[4]);
		double z = 0.0;
		if(x1 < 0 && y1 < 0 && x>0 && y >0){
			x1 = x1 * -1;
			y1 = y1 * -1;
		}
		if ((x1 - x) < 0)
			z = z + (-1)*(x1 - x);
		else 
			z = z + (x1 - x);
		if((y1-y)< 0)
			z = z + (-1)*(y1 - y);
		else
			z = z + (y1 - y);
		z = z / ( 2* r);
		z = Math.ceil(z);
		//System.out.println(z);
		int q = (int)(z);
		System.out.println(q);
		
		
	}
}