import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long idx = (long)Math.sqrt(n) + 1; long prev = 0; System.out.println(idx + n / idx - 1); } }