import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class B {
  public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter out = new PrintWriter(System.out);
    String[] part = in.readLine().split(" ");
    int r = Integer.parseInt(part[0]);
    int x = Integer.parseInt(part[1]);
    int y = Integer.parseInt(part[2]);
    int x1 = Integer.parseInt(part[3]);
    int y1 = Integer.parseInt(part[4]);
    if (x == x1 && y == y1)
      out.println(0);
    else {
      int ans = 1;
      int xd = Math.abs(x - x1);
      ans += xd / (2 * r);
      int yd = Math.abs(y - y1);
      ans += yd / (2 * r);
      out.println(ans);
    }
    out.close();
    in.close();
  }
}
