#!python
# -*- coding: utf-8 -*-


def main():
    K = int(input())

    i = 0
    n = 0
    while n + i + 1 < K:
        i += 1
        n += i
    s = ('1 ' * (i + 1) + '3 3 ' + '8 ' *
         ((K - n) // 2) + '6 7' * ((K - n) % 2))[:-1]
    print(i + 1 + 2 + (K - n) // 2 + ((K - n) % 2) * 2)
    print(s)


if __name__ == '__main__':
    main()