#!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) + '5 ' + '8 ' * (K - n))[:-1] print((len(s) + 1) // 2) print(s) if __name__ == '__main__': main()