
import java.io.*;
import java.util.*;
 
public class amr{
    public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int r= sc.nextInt();
        int x1= sc.nextInt();
        int y1=sc.nextInt();
        int x2=sc.nextInt();
        int y2= sc.nextInt();
        int res=(Math.abs(x2-x1) +Math.abs(y2-y1))/(2*r);
        System.out.println(res);
           
    }
}

