import java.io.*; import java.util.*; class Main { public static void main(String args[])throws Exception { BufferedReader bu=new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb=new StringBuilder(); long n=Long.parseLong(bu.readLine()); long r=root(n),ans=Math.min(n,r+(n-r*r)+2); System.out.print(ans); } static long root(long n) { long l=1,r=(int)1e9,ans=l,mid; while(l<=r) { mid=(l+r)>>1; if(mid*mid<=n) { ans=mid; l=mid+1; } else r=mid-1; } return ans; } }