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

/**
 * 

 0  0
------
 0  2
 0 -2
 2  0
-2  0
------
  
 1  1
------
 1  2
 1  0
 0  1
 1  0
 * */
public class B_Div2_287 {
    public static void main(String[]arg) throws IOException
    {
        new B_Div2_287().solve();
    }
    public void solve()throws IOException
    {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(in.readLine());
        int r = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        int xp = Integer.parseInt(st.nextToken());
        int yp = Integer.parseInt(st.nextToken());
        int ans = 0; 
        if(x == xp && y == yp)
        {
            ans = 0;
        }
        else
        {
            double d = Math.sqrt(Math.pow(Math.abs(x-xp), 2)+Math.pow(Math.abs(y-yp), 2));
            int steps = (int)Math.ceil(d/(2*r));
            ans = steps;
        }
        System.out.println(ans);
    }
}
