//package div2B;

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

public class AmrAndPins {
    public static void main(String[] args) {
        MyScanner scn = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        long r = scn.nextInt();
        long ix = scn.nextInt();
        long iy = scn.nextInt();
        long fx = scn.nextInt();
        long fy = scn.nextInt();
        long val = (fx-ix)*(fx-ix);
        long val2 = (fy-iy)*(fy-iy);
        int ans = (int)Math.ceil(Math.sqrt(val + val2)/(2*r));
        System.out.println(ans);












        out.close();
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                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() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}
