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

public class Main
{
    
    public static void main(String[] args) 
    {
      
        FastScanner input = new FastScanner();
       long n = input.nextInt()*2;
       long x1 = input.nextInt();
       long y1 = input.nextInt();
       long x2 = input.nextInt();
       long y2 = input.nextInt();
       long ans = (long)Math.ceil((Math.sqrt(((x2-x1)*(x2-x1))+((y1-y2)*(y1-y2))))/n);
       
        System.out.println(ans);
    }

    static class FastScanner
    {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next()
        {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {

            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() throws IOException
        {
            return br.readLine();
        }
    }

}