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

public class B {

  static int r, x1, x2, y1, y2;

  static void calc() {
    long x_sq = (x1 - x2) * (x1 - x2);
    long y_sq = (y1 - y2) * (y1 - y2);
    double dist = Math.sqrt(x_sq + y_sq);
    long result = (long) Math.ceil(dist/(2.0 * r));
    System.out.println(result);
  }

  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s = br.readLine();
    String[] tokens = s.split(" ");
    r = Integer.parseInt(tokens[0]);
    x1 = Integer.parseInt(tokens[1]);
    y1 = Integer.parseInt(tokens[2]);
    x2 = Integer.parseInt(tokens[3]);
    y2 = Integer.parseInt(tokens[4]);
    calc();
  }
}
