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

public class Prb{

    static PrintWriter pw;
    static Scanner sc;
    
    static void print(final String arg) {
      pw.write(arg);
      pw.flush();
    }

    static void println(final String arg) {
      pw.write(arg+"\n");
      pw.flush();
    }

    static void print(final int arg) {
      pw.write(arg);
      pw.flush();
    }    

    static void runFile() throws Exception {

      sc = new Scanner(new FileReader("input.txt"));
      pw = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));

    }

    static void runIo() throws Exception  {

      pw =new PrintWriter(System.out);
      sc = new Scanner(System.in);

    }    
 


	public static void main(String[] args)  throws Exception {


         // runFile();

         runIo();   
 	
         int r  = sc.nextInt();
         int x1 = sc.nextInt();
         int y1 = sc.nextInt();
         int x2 = sc.nextInt();
         int y2 = sc.nextInt();
 
 	     int ans = Math.abs(Math.abs(x1-x2) + Math.abs(y1-y2) );


		 print( (int)Math.ceil((double)ans/(2*(double)r))+"");


    }
                        
   


}