import java.util.*;

public class AmarAndPins {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    int r = scn.nextInt();
    int x1 = scn.nextInt();
    int y1 = scn.nextInt();
    int x2 = scn.nextInt();
    int y2 = scn.nextInt();

    double ans = Math.sqrt((x2 - x1) * (x2 - x1) * 1.0 + (double) (y2 - y1) * (y2 - y1) * 1.0);

    int res = (int) (ans / r - 1);

    System.out.println(res == -1 ? 0 : res);

    scn.close();
  }
}
