n = int(input()) import math i = math.floor(math.sqrt(n)) print(i+2+n-i**2)