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

public class AmrAndPins {
    public static void main(String[] args) {
        FastScanner sc = new FastScanner(System.in);

        int r = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();

        System.out.println(solve(r, x, y, x2, y2));
    }

    static int solve (int r, int x, int y, int x2, int y2) {
        if(x == x2 && y == y2) {
            return 0;
        }

        int distance = (int) Math.ceil((Math.sqrt(Math.pow(x - x2, 2) + Math.pow(y - y2, 2))));

        if(distance % 2 == 0) {
            return distance / (2 * r);
        } else {
            return (distance / (2 * r)) + 1;
        }
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            try {
                br = new BufferedReader(new
                        InputStreamReader(stream));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

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

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

        String nextString() {
            return next();
        }

        String nextLine() {
            String s = null;
            try {
                return  br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

        Long nextLong() {
            return Long.parseLong(next());
        }
    }
}