n = int(input()) move = [2, 2, -1, -1, 2, -1, -1] a = 0 b = 0 for i in move*100: a += i b += abs(i) if a == n: break print(b)