import java.util.Scanner;
import static java.lang.Math.*;
public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner (System.in);
        int r = scan.nextInt()*2;
        int x = scan.nextInt();
        int y = scan.nextInt();
        int x1 = scan.nextInt();
        int y1 = scan.nextInt();
        int dlin=(int)ceil(sqrt((max(x,x1)-min(x,x1))*(max(x,x1)-min(x,x1)) + (max(y,y1)-min(y,y1))*(max(y,y1)-min(y,y1))));
        //System.out.println(dlin);
        if (dlin%r!=0) System.out.println(dlin/r+1);
        else System.out.println(dlin/r);
    }
}