N = int(input() P = [] last = 2 for _ in range(N): # 골듭흐 파티션