#include using lint = long long; void solve() { lint n; std::cin >> n; lint ok = 0, ng = 1 << 30; while (ng - ok > 1) { auto mid = (ok + ng) / 2; if (mid * mid <= n) { ok = mid; } else { ng = mid; } } std::cout << ok + n / ng << "\n"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }