import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class Main {
    
    public void solve() throws IOException {
        long R=nextLong(),
            x0=nextLong(), y0=nextLong(),
            x1=nextLong(), y1=nextLong();
        R=R*R*4;
        long dist=((long)x1-x0)*(x1-x0)+(y1-y0)*(y1-y0);
        long l=0, r=1000000;
        while (l<r) {
            long mid=l+(r-l)/2;
            BigInteger step = BigInteger.valueOf(mid);
            step=step.multiply(step).multiply(BigInteger.valueOf(R));
            if (step.compareTo(BigInteger.valueOf(dist))>=0) r=mid;
            else l=mid+1;
        }
        out.println(r);     
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    final String fileIn = "test.in";
    final String fileOut = "output.txt";
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st = new StringTokenizer("");

    private void run() throws IOException {
//      if (new File(fileIn).exists())
//          in = new BufferedReader(new FileReader(fileIn));
//      else {
            in = new BufferedReader(new InputStreamReader(System.in)); // стандартный ввод 
//      }
//      if (new File(fileOut).exists()) {
//          out = new PrintWriter(new FileWriter(fileOut));
//      } else {
            out = new PrintWriter(System.out); // стандартный вывод
//      }
        solve();
        in.close();
        out.close();
    }

    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }

    int gcd(int a, int b) {
        return (b == 0 ? a : gcd(b, a % b));
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }

    boolean EOF() throws IOException {
        while (!st.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null)
                return true;
            st = new StringTokenizer(s);
        }
        return false;
    }
}