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

/**
 *
 * @author colander
 */
public class CF287B {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new CF287B();
    }

    public CF287B(){
        BufferedReader scanner = new BufferedReader(new InputStreamReader(System.in));
        String in = "";
        try {
            in = scanner.readLine();
        } catch (IOException ex) {
        }
        String[]sp = in.split(" ");
        double r = Integer.parseInt(sp[0]);
        long x1 = Long.parseLong(sp[1]);
        long y1 = Long.parseLong(sp[2]);
        long x2 = Long.parseLong(sp[3]);
        long y2 = Long.parseLong(sp[4]);
        long xd = Math.abs(x1 - x2);
        long yd = Math.abs(y1 - y2);
        int ans = (int)Math.floor(Math.sqrt(xd * xd + yd * yd)/r - 1);
        if(ans > 0) System.out.println(ans); else System.out.println(0);
    }
}
