import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader bf =  new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader bf =  new BufferedReader(new FileReader("p.txt"));
		
		StringTokenizer tk = new StringTokenizer(bf.readLine());
		
		int r = Integer.parseInt(tk.nextToken());
		int x = Integer.parseInt(tk.nextToken());
		int y = Integer.parseInt(tk.nextToken());
		int X = Integer.parseInt(tk.nextToken());
		int Y = Integer.parseInt(tk.nextToken());
		
		System.out.println(((Math.abs(x-X))+(Math.abs(y-Y)))/(2*r));
			
	}
}
