import java.io.PrintWriter;
import java.util.Scanner;

public class Solution {
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int r = sc.nextInt(), x = sc.nextInt(), y = sc.nextInt(), x1 = sc.nextInt(), y1 = sc.nextInt();
        if (x < 0) {
            x1 -= x;
            x = 0;
        }
        if (x1 < 0) {
            x -= x1;
            x1 = 0;
        }
        if (y < 0) {
            y1 -= y;
            y = 0;
        }
        if (y1 < 0) {
            y -= y1;
            y1 = 0;
        }
        double rasst = Math.sqrt(Math.pow(x-x1, 2) + Math.pow(y-y1, 2));
        int k = 0;
        if (x == x1 && y == y1) {
            rasst = 0;
        } else if (rasst<=2*r) {
            k = 1;
            rasst = 0;
        } else {
            while (rasst > 0) {
                rasst = Math.max(0, rasst-2*r);
                k++;
            }
        }
        pw.println(k);
        pw.close();
    }
}