def main(K): if K == 0: print(1, 10, sep="\n") return elif K == 1: print(2, *[1, 1], sep="\n") return ok = False for i in range(1, int(K ** 0.5 + 0.5) + 1): if K % i == 0 and (i + K // i) <= 250: ok = True two, three = i, K // i break if ok: print(two + three) A = [3] * two + [7] * three print(*A) return one = 2 while True: x = one * (one - 1) // 2 ok = False if x > K: break tmp = K - x for i in range(1, int(tmp ** 0.5 + 0.5) + 1): if tmp % i == 0 and (one + i + tmp // i) <= 250: ok = True two, three = i, K // i break if ok: break one += 1 if ok: print(one + two + three) A = [1] * one + [3] * two + [7] * three print(*A) return print(None) return K = int(input()) main(K)