import math print(2 * int(math.sqrt(int(input()))))