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