import java.util.Scanner;

public class Main {
	static Scanner s;

	

	public static void main(String[] args) {
		{int n=5;
		int steps=0;
		 s= new Scanner(System.in);
		int a[]=new int[5];
		
			for(int i=0;i<n;i++)
			{a[i]=s.nextInt();}
			double distance=Math.sqrt(Math.pow(a[3]-a[1], 2)+Math.pow(a[4]-a[2],2));
			 if((int)distance==0)
				{steps=0;}
			 else if(a[0]<distance)
			{while(a[0]<distance)
			{steps++;
				a[0]=a[0]+a[0];				
			}}
			else if(a[0]>distance)
			{
				while(a[0]>distance)
				{steps++;
					a[0]=a[0]-a[0];				
				}
			}
		
System.out.println(steps);
			
			
		}
	}

}
