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

public class G {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tk = new StringTokenizer(bf.readLine());
		int r=Integer.parseInt(tk.nextToken()),x1=Integer.parseInt(tk.nextToken()),y1=Integer.parseInt(tk.nextToken()),x2=Integer.parseInt(tk.nextToken()),y2=Integer.parseInt(tk.nextToken());
		int a=Math.abs(x1-x2);
		int b=Math.abs(y1-y2);
		System.out.println((a+b)/(2*r));
	}

}

				   	   		 		 	      			  		