
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String line = in.nextLine();
        String[] tokens = line.split("\\s+");
        double thing = (Math.sqrt((Math.pow(Integer.parseInt(tokens[1]) - Integer.parseInt(tokens[3]), 2)) + 
                (Math.pow(Integer.parseInt(tokens[2]) - Integer.parseInt(tokens[4]), 2))))  / (2 * Integer.parseInt(tokens[0]));
        if(thing == 1){
            System.out.println(1);
        }else if(thing < 1){
            System.out.println(2);
        }else if(thing == 0){
            System.out.println(0);
        }
        else{
            System.out.println((int)Math.ceil(thing));
        }
    }
}