from math import sqrt n=int(input()) s=int(sqrt(n)) if n//s-n//(s+1)>1: s+=1 print(s-1+n//s)