

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

public class AmrandPins {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double r = in.nextInt();
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();
        int re = (int) Math.ceil((Math.abs(x1-x2)+Math.abs(y1-y2))/(2*r));
        System.out.println(re);
    }
}
