n = gets.to_i x = Math.sqrt(n).to_i x += 1 if n / x - 1 != n / (x + 1) puts n / x + x - 1