import java.util.Arrays;
import java.util.Scanner;
public class JavaApplication18 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double r=sc.nextInt();
double x=sc.nextInt();
double y=sc.nextInt();
double x1=sc.nextInt();
double y1=sc.nextInt();
double res=Math.abs((x+y)-(x1+y1));
//System.out.println("res="+res);

System.out.println((int)Math.ceil((res)/(2*r)));


}

}