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

public class Q11 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int r = s.nextInt();
		int x = s.nextInt();
		int y = s.nextInt();
		int x1 = s.nextInt();
		int y1 = s.nextInt();

		int d = 2 * r;

		int dist = Math.abs(x1 - x + y1 - y);
		System.out.println(dist / d);
	}

}
