n=int(input()) tmp=0 for i in range(max(1, int(n**0.5)-2),max(1, int(n**0.5)+2)): if n/i-n/(i+1)<1: tmp=i break print((tmp-1)+n//tmp)