/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;
import java.math.*;
import java.io.*;

/**
 *
 * @author magzhankairanbay
 */
public class Code {
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try {
        
            Scanner in = new Scanner(System.in);
            
            int r = in.nextInt();
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();
            
            int d = Math.abs(x1 - x2) + Math.abs(y1 - y2);
            int ans = 0;
            
            if (d % (2 * r) == 0) {
                ans = (d / (2 * r));
            } else {
                ans = (d / (2 * r)) + 1;
            }
            
            System.out.println(ans);
            
        } catch(Exception ex) {
        
            System.out.println(ex.toString());
        }
    }
    
}