#!python # -*- coding: utf-8 -*- def main(): K = int(input()) if K < 5: 1/0 i = 0 n = 0 while n + i + 1 <= K: i += 1 n += i s = ('1 ' * n + '5 ' + '8 ' * (K - n))[:-1] print((len(s) + 1) // 2) print(s) if __name__ == '__main__': main()