import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class AmrAndPins {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] inp = br.readLine().trim().split(" ");
		int r = Integer.parseInt(inp[0]);
		int x = Integer.parseInt(inp[1]);
		int y = Integer.parseInt(inp[2]);
		int x_x = Integer.parseInt(inp[3]);
		int y_y = Integer.parseInt(inp[4]);
		
		//find the distance between (x,y) and (x_x,y_y)
		double distance = Math.sqrt(Math.pow(x-x_x,2) + Math.pow(y-y_y,2));
		//System.out.println("Distance = " + distance);
		if ( distance == 0 ) {
			System.out.println("0");
		} else {
			int div = (int)Math.floor(distance/(2*r));
			int rem = 0;
			if ( distance % (2 *r) == 0 ) {
				rem = 0;
			} else {
				rem = 1;
			}
			//System.out.println("div = " + div + " rem = " + rem);
			int x1 = div + rem;
			System.out.println(x1);
		}
	}
}
