function Main (input){
  input = input.split("\n");
  tmp = input[0].split(" ");
  var N = parseInt(tmp[0],10);
  var susumi = 0;
  var ugoku = 0;
  ugoku = ugoku + 2*(Math.sqrt(N)) - 2;
  susumi = susumi + Math.ceil(ugoku);
  console.log(susumi);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));