output_description: Print the minimum number of moves needed to reach a square that contains the
  integer N.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: tall = int(input())
  bit = int(tall ** (1 / 2))
  while (tall / bit) % 1 != 0:
      bit -= 1
  print(bit + tall / bit - 2)
  
problem_description: Statement
  
  Takahashi is standing on a multiplication table with infinitely many rows and
  columns.
  
  The square (i,j) contains the integer i \times j. Initially, Takahashi is
  standing at (1,1).
  
  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).
  
  Given an integer N, find the minimum number of moves needed to reach a square
  that contains N.
samples: [{"input": "10", "output": "5\n    \n\n(2,5) can be reached in five moves. We cannot reach a square that contains 10\nin less than five moves.\n\n* * *"}, {"input": "50", "output": "13\n    \n\n(5, 10) can be reached in 13 moves.\n\n* * *"}, {"input": "10000000019", "output": "10000000018\n    \n\nBoth input and output may be enormous."}]