
import java.util.*;

public class Expert {

    public static Scanner in = new Scanner(System.in);

    public static int count(double n, double n1, double r) {
        int count = 0;
        n1 -= r;
        n += r;
        double sp = Math.abs(n1 - n);
        count = (int) Math.ceil(sp / r);
        return count;
    }

    public static void main(String[] args) {
        double r = in.nextInt();
        double x = in.nextInt();
        double y = in.nextInt();
        double x1 = in.nextInt();
        double y1 = in.nextInt();
        if (x == x1 && y == y1) {
            System.out.println("0");
        } else {
            int ans = 0;
            if (x != x1) {
                ans += count(x, x1, r);
            }
            if (y != y1) {
                ans += count(y, y1, r);
            }
            System.out.println(ans + 1);
        }
    }

}
