Accepted
代码
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;
long long n,ans;
int main()
{
cin>>n;
ans=sqrt(n);
if(ans==n/ans) ans=ans*2-1;
else ans=ans*2;
printf("%lld",ans);
}