k = int(input()) a = i = 0 while a+i <= k: a += i i += 1 k -= a c = [1]*i if k >= 2: c += [3,3] while k >= 2: c.append(8) k -= 2 if k == 1: c += [7,24] print(len(c)) print(*c[::-1])