import java.util.*;
public class A490 {

	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();
        double r1 = Math.sqrt(Math.pow(x-x1,2)+Math.pow(y-y1,2));
        if(x1==x && y1==y){
            System.out.println(0);
            return; 
        }
        if((r1/r)<1){
            System.out.println(1);
            return;
        }
        if(x1-x==y1-y){
            System.out.println(((int)r1/r)-1);
        }else{
            if(r1%r==0){
                System.out.println(((int)r1/r)-1);
            }else{
            System.out.println(((int)r1/r));
            }
        }
        
	}
}