import math N = int(input()) ro = int(math.sqrt(N)) print(ro * 2)