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