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

public class C507B {
	private StringTokenizer st;
	private BufferedReader bf;
	

	public C507B() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int r = nextInt();
			int x1 = nextInt();
			int y1 = nextInt();
			int x2 = nextInt();
			int y2 = nextInt();
			
			long x = Math.abs(x2-x1);
			long y = Math.abs(y2-y1);
			double sq = Math.sqrt(x*x+y*y);
//			double sq = Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
			System.out.println((long)(Math.ceil(sq / (r*2.0))));
//			double d = Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
//			int dd =r*2;
//			int cut = 0;
//			double ans = 0.0;

//			while (d > ans) {
//				cut++;
////				ans = dd * cut;
//				ans += dd;
//			}
//			System.out.println(cut);
			
			
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	

	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	
	private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		C507B c = new C507B();
	}
}
