#include <bits/stdc++.h>
using namespace std;
int r, x, y, t_x, t_y, mx;
int main() {
  while (scanf("%d %d %d %d %d\n%", &r, &x, &y, &t_x, &t_y) != EOF) {
    mx = (abs(x - t_x), abs(y - t_y));
    printf("%d\n", mx / r + mx % r ? 1 : 0);
  }
  return 0;
}
