
import java.util.*;
import java.io.*;

public class codeforcesB {

	
	public static void main(String[] args) {
		
		
		Scanner sc = new Scanner(System.in);
		int r = sc.nextInt()*2;
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
		
		int x = Math.abs(x2-x1);
		int y = Math.abs(y2-y1);
		int sum  =  x + y;
		
		System.out.println((int)Math.ceil(sum*1.0/r));
	}
}
