import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Solution {

    private static final boolean FROM_FILE = false;
    private static final boolean TO_FILE = false;

    public static void main(String[] args) throws IOException {
        BufferedReader br;
        if (FROM_FILE) {
            br = new BufferedReader(new FileReader("C:/home/programming/input.txt"));
        } else {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        PrintWriter pw;
        if (TO_FILE) {
            pw = new PrintWriter("C:/home/programming/output.txt");
        } else {
            pw = new PrintWriter(System.out);
        }

        // Algorithm:
        String[] line = br.readLine().split(" ");
        int r = Integer.parseInt(line[0]);
        int x = Integer.parseInt(line[1]);
        int y = Integer.parseInt(line[2]);
        int x2 = Integer.parseInt(line[3]);
        int y2 = Integer.parseInt(line[4]);

        long hd = x2 - x;
        long vd = y2 - y;
        long diff = hd * hd + vd * vd;
        long r2 = 4 * (long) r * r;

        double cD = Math.sqrt(diff / r2);
        long cL = (long) cD;
        long c = cL + (cL * r2 != diff ? 1 : 0);
        pw.println(c);
        pw.flush();
    }
}