/* package whatever; // don't place package name! */
 
import java.util.*;
import java.io.*;
import java.text.DecimalFormat;
 
/* Name of the class has to be "Main" only if the class is public. */
public class yay
{
	public static int gcd(int a, int b)
	{
		if(b==0) return a;
		return gcd(b, a%b);
	}
	public static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	public static boolean[] t_primes(long n){		//O(n*ln(ln(n))) =~ O(n)
		boolean [] is_prime = new boolean[(int)n+1];
		is_prime[0]=is_prime[1]=true;
		for(long i = 2 ; i*i <= n ; ++i){
			if(is_prime[(int)i] == false){
				for(long j = i*i ; j <= n ; j+=i){
					is_prime[(int)j] = true;
				}
			}
		}
		return is_prime;
	}
	public static boolean isPerfectSquare(double x)  
    { 
          
        // Find floating point value of 
        // square root of x. 
        double sr = Math.sqrt(x); 
      
        // If square root is an integer 
        return ((sr - Math.floor(sr)) == 0); 
    } 
	public static void main(String[] args) throws java.lang.Exception{
		MyScanner sc = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int r = sc.nextInt(), x1 = sc.nextInt(), y1 = sc.nextInt(), x2 = sc.nextInt(), y2 = sc.nextInt();
		int r2 = r*2;
		int xd = Math.abs(x1-x2);
		int yd = Math.abs(y1-y2);
		int xy = xd+yd;
		int sum = 0;
		if(xy%r2==0)
		{
			sum+=(xy/r2);
		}
		else if((double)((xy%r2)/r2)>0.2)
		{
			sum++;
			sum+=(xy/r2);
		}
		else
		{
			sum+=(xy/r2);
		}
		out.println(sum);
		out.close();
    }

	static class MyScanner{
        StringTokenizer st;
        BufferedReader br;
        public MyScanner(){br = new BufferedReader(new InputStreamReader(System.in));}
        public MyScanner(FileReader s) throws FileNotFoundException {	br = new BufferedReader(s);}
        public String next() throws IOException{
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public long nextLong() throws IOException {return Long.parseLong(next());}
        public String nextLine() throws IOException {return br.readLine();}
        public double nextDouble() throws IOException { return Double.parseDouble(next()); }
        public boolean ready() throws IOException {return br.ready();}
    }
} 