n = int(input()) flag = False count = 1 def solve(i): global flag global count if i == n or flag == True: flag = True return True c = i * 2 count += 1 for j in reversed(range(i)): if solve(c - j): return True return False solve(1) print(count)