output_description: In the first line, print |s|, the length of s. In the second line, print the
  elements in s in order, with spaces in between. Any string that satisfies the
  above conditions will be accepted.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: def nCr(a, b):
      tmp = 1
      for i in range(a, a - b, -1):
          tmp *= i
      for i in range(1, b + 1, 1):
          tmp //= i
      return tmp
  
  
  n = int(input())
  out = []
  co = 1
  coo = 0
  while n > 0:
      t = 2
      while True:
          sum1 = 0
          for j in range(2, t + 1, 2):
              sum1 += nCr(t, j)
          # 		print(n,sum)
          if n < sum1:
              t -= 1
              # 			n-=rco
              break
          rco = sum1
          t += 1
      ad = [co for _ in range(t)]
      sum1 = rco
      ma = sum1
      # 	print(ma)
      for toa in range(1, 4):
          for tob in range(1, 4):
              CO = 0
              for r in range(1, min(toa, tob) + 1):
                  CO += nCr(toa, r) * nCr(tob, r)
  
              for a in range(1, t):
                  sum2 = sum1 + ((2 ** (toa + tob - 1)) - 1)
                  for b in range(1, a + 1):
                      sum2 += nCr(a, b) * nCr(t - a, b) * CO
                  if sum2 > n:
                      continue
                  if ma < sum2:
                      ma = sum2
                      ad = [co for _ in range(a)]
                      for _ in range(toa):
                          ad.append(100 - coo)
                      for _ in range(t - a):
                          ad.append(co)
                      for _ in range(tob):
                          ad.append(100 - coo)
  
      # 	print(ad,0,ma)
      for t in ad:
          out.append(t)
      # 	out.append(ad)
      n -= ma
      coo += 1
      co += 1
  print(len(out))
  print(*out)
  
problem_description: Statement
  
  We will call a string x _good_ if it satisfies the following condition:
  
    * Condition: x can be represented as a concatenation of two copies of another string y of length at least 1.
  
  For example, `aa` and `bubobubo` are good; an empty string, `a`, `abcabcabc`
  and `abba` are not good.
  
  Eagle and Owl created a puzzle on good strings. Find one string s that
  satisfies the following conditions. It can be proved that such a string always
  exists under the constraints in this problem.
  
    * 1 ≤ |s| ≤ 200
    * Each character of s is one of the 100 characters represented by the integers 1 through 100.
    * Among the 2^{|s|} subsequences of s, exactly N are good strings.
samples: [{"input": "7", "output": "4\n    1 1 1 1\n    \n\nThere are two good strings that appear as subsequences of s: (1,1) and\n(1,1,1,1). There are six occurrences of (1,1) and one occurrence of (1,1,1,1),\nfor a total of seven.\n\n* * *"}, {"input": "299", "output": "23\n    32 11 11 73 45 8 11 83 83 8 45 32 32 10 100 73 32 83 45 73 32 11 10"}]