import java.lang.Math;
import java.util.Scanner;
public class Demo {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int x0=sc.nextInt();
        int y0=sc.nextInt();
        int x1=sc.nextInt();
        int y1=sc.nextInt();
        int count=0;
        count=(Math.abs(x0-x1)+Math.abs(y0-y1))/(2*r);
        System.out.print(count);
    }
}