import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Codeforces {
    static class compare {
        int a;
        int b;

        public compare(int a, int b) {
            this.a = a;
            this.b = b;
        }
    }

    // comparator class //
    static Comparator<compare> cmp = new Comparator<compare>() {
        public int compare(compare a, compare b) {
            if (a.a > b.a)
                return 1;
            else if (a.a < b.a)
                return -1;
            else
                return 0;
        }
    };

    static int getDistance(int x1, int y1, int x2, int y2) {
        int distance = (int) Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2)
                * (y1 - y2));
        return distance;
    }

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

        if (x1 == x2 && y1 == y2) {
            System.out.println(0);
        } else {
            int get = getDistance(x1, y1, x2, y2);
            //System.out.println(get);
            int min = get / (r) - 1;

            System.out.println(min);
        }
    }
}