#include #include int main(){ long n; scanf("%ld", &n); long x = sqrt(n); while (x * x > n) --x; printf("%ld\n", x + n / (x + 1)); return 0; }