#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long A1A = 0;
vector<long long> primes_till_n(long long n);
set<long long> get_divisors(long long n);
map<long long, long long> prime_factors(long long n);
long long gcd(long long a, long long b);
long long pow_longlong(long long base, long long exponent);
bool is_2lines_intersect(int L1, int R1, int L2, int R2);
bool is_2lines_intersect(pair<int, int>& a, pair<int, int>& b);
vector<long long> dsu_ids;
vector<long long> dsu_size;
long long dsu_compnents;
vector<long long> get_segments_of_binary_string(string s);
long long extended_eculidean(long long a, long long b, long long& x,
                             long long& y);
long long mod_inverse(long long a, long long mod);
long long nCr(long long n, long long r);
class dsu_interface {
 public:
  virtual void unify(int id1, int id2) = 0;
  virtual int find(int id) = 0;
  virtual int get_components_count() = 0;
  virtual map<int, vector<int>> get_components() = 0;
};
class dsu : public dsu_interface {
 private:
  int compnents_count;
  vector<int> id_of_compnent;
  vector<int> size_of_compnent;

 public:
  dsu(int elements_count) {
    id_of_compnent.resize(elements_count);
    size_of_compnent.resize(elements_count);
    this->compnents_count = elements_count;
    for (int i = 0; i < elements_count; i++) {
      id_of_compnent[i] = i;
      size_of_compnent[i] = 1;
    }
  }
  int find(int element_id) override {
    int root = element_id;
    while (root != id_of_compnent[root]) root = id_of_compnent[root];
    while (root != element_id) {
      int next = id_of_compnent[element_id];
      id_of_compnent[element_id] = root;
      element_id = next;
    }
    return element_id;
  }
  void unify(int id1, int id2) override {
    int root1 = this->find(id1);
    int root2 = this->find(id2);
    if (root1 == root2) return;
    if (size_of_compnent[root1] > size_of_compnent[root2]) {
      size_of_compnent[root1] += size_of_compnent[root2];
      id_of_compnent[root2] = root1;
    } else {
      size_of_compnent[root2] += size_of_compnent[root1];
      id_of_compnent[root1] = root2;
    }
    this->compnents_count--;
  }
  map<int, vector<int>> get_components() override {
    set<int> st;
    for (int i : this->id_of_compnent) st.insert(i);
    map<int, int> ordinal_id_of;
    int id = 0;
    for (int i : st) ordinal_id_of[i] = id++;
    map<int, vector<int>> components;
    for (int i = 0; i < this->id_of_compnent.size(); i++)
      components[ordinal_id_of[this->id_of_compnent[i]]].push_back(i);
    return components;
  }
  virtual int get_components_count() override { return this->compnents_count; }
};
const int prime_mod = (int)1e9 + 7;
const int mem_size = (int)2e5 + 2;
long long mem[mem_size][31];
struct point {
  long long x, y, tag, visited;
  point(long long _x, long long _y, long long t) {
    x = _x;
    y = _y;
    tag = t;
  }
  point(long long _x, long long _y) : x{_x}, y{_y}, tag{-1} {}
  point() : tag{-1} {}
  point(std::initializer_list<long long> l) {
    auto itr = l.begin();
    x = *itr;
    itr++;
    y = *itr;
    itr++;
    if (itr != l.end()) tag = *itr;
  }
};
struct point_comper {
  bool operator()(point a, point b) {
    if (a.x == b.x) return a.y < b.y;
    return a.x < b.x;
  }
};
struct pair_comper {
  bool operator()(pair<int, int> a, pair<int, int> b) {
    return a.second < b.second;
  }
};
bool comper1(pair<int, int> a, pair<int, int> b) { return a.first > b.first; }
vector<int> visited;
int nodes_count = 0;
void dfs(int n, vector<vector<int>>& g) {
  visited[n] = true;
  nodes_count++;
  for (int i : g[n]) {
    if (!visited[i]) dfs(i, g);
  }
}
inline void solve() {
  long long r, x1, y1, x2, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  long long dx, dy;
  dx = abs(x2 - x1);
  dy = abs(y2 - y1);
  long long dist = dx * dx + dy * dy;
  long long ans = dist / (2 * r);
  if (dist % (2 * r) != 0) ans++;
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    solve();
    cout << '\n' << '\n';
  }
  return 0;
}
long long nCr(long long n, long long r) {
  if (r > n) return 0;
  long long res = 1;
  if (r > n - r) r = n - r;
  for (int i = 0; i < r; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
bool is_2lines_intersect(int L1, int R1, int L2, int R2) {
  if (L1 > R2 || L2 > R1) return false;
  return true;
}
bool is_2lines_intersect(pair<int, int>& a, pair<int, int>& b) {
  return is_2lines_intersect(a.first, a.second, b.first, b.second);
}
vector<long long> primes_till_n(long long n) {
  vector<long long> ans;
  vector<long long> prime(n + 1, 1);
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p]) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p] > 0) ans.push_back(p);
  return ans;
}
set<long long> get_divisors(long long n) {
  set<long long> divs;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) divs.insert(i);
    if (n % (n / i) == 0) divs.insert(n / i);
  }
  return divs;
}
map<long long, long long> prime_factors(long long n) {
  auto primes = primes_till_n(sqrt(n) + 1);
  map<long long, long long> mp;
  for (long long i : primes) {
    while (n % i == 0) {
      n /= i;
      mp[i]++;
    }
  }
  if (n > 2) mp[n]++;
  return mp;
}
int bs_on_most_left(int L, int R, int arr[]) {
  int mn = arr[L];
  int LL = L;
  while (L < R) {
    int mid = L + (R - L) / 2;
    if (arr[mid] > 2 * mn) {
      R = mid;
    } else {
      L = mid + 1;
    }
  }
  if (!(arr[L] > 2 * mn)) return -1;
  return L - LL;
}
int bs_on_most_right(int L, int R, int arr[]) {
  int mx = arr[R];
  int RR = R;
  while (L < R) {
    int mid = L + (R - L + 1) / 2;
    if (arr[mid] < ceil(mx / 2.0))
      L = mid;
    else
      R = mid - 1;
  }
  if (arr[R] >= ceil(mx / 2.0)) return -1;
  return RR - R;
}
char next_small_char(char c) {
  char ans = ((c - 'a') + 26 + 1) % 26;
  return ans + 'a';
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long extended_eculidean(long long a, long long b, long long& x,
                             long long& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  long long d = extended_eculidean(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return d;
}
long long mod_inverse(long long a, long long mod) {
  long long x, y;
  long long gcd_ = extended_eculidean(a, mod, x, y);
  if (gcd_ != 1) return -1;
  return (x % mod + mod) % mod;
}
void bridges_dfs(vector<vector<int>>& g, int at, int parent,
                 vector<bool>& visited, vector<int>& ids, vector<int>& low,
                 vector<pair<int, int>>& ans) {
  static int id = 0;
  visited[at] = true;
  ids[at] = low[at] = id++;
  for (auto to : g[at]) {
    if (to == parent) continue;
    if (visited[to]) {
      low[at] = min(low[at], ids[to]);
    } else {
      bridges_dfs(g, to, at, visited, ids, low, ans);
      low[at] = min(low[at], low[to]);
      if (low[to] > ids[at]) ans.push_back({at, to});
    }
  }
}
vector<pair<int, int>> bridges(vector<vector<int>> g) {
  vector<bool> visited(g.size());
  vector<pair<int, int>> ans;
  vector<int> low(g.size()), id(g.size());
  for (int i = 0; i < g.size(); i++) {
    if (!visited[i]) {
      bridges_dfs(g, i, -1, visited, id, low, ans);
    }
  }
  return ans;
}
long long pow_longlong(long long base, long long exponent) {
  long long ans = 1;
  for (int i = 0; i < exponent; i++) ans = ans * base;
  return ans;
}
vector<long long> get_segments_of_binary_string(string s) {
  vector<long long> ans;
  bool is_zeros_seg = (s[0] == '0');
  long long crnt_seg_lenght = 1;
  for (int i = 1; i < s.size(); i++) {
    if ((is_zeros_seg && s[i] == '0') || (!is_zeros_seg && s[i] == '1'))
      crnt_seg_lenght++;
    else {
      ans.push_back(crnt_seg_lenght);
      crnt_seg_lenght = 1;
      is_zeros_seg = !is_zeros_seg;
    }
  }
  ans.push_back(crnt_seg_lenght);
  return ans;
}
