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); if (n / idx > n / (idx + 1)) { idx++; } long prev = 0; System.out.println(idx + n / idx - 1); } }