N = int(input()) m = N ops = [] while N != 1: if N >= 10**18: op = ops.pop() if op == "/": N *= 2 if op == "-": N = (N + 1) // 3 if op == "+": N = (N - 1) // 3 while True: op = ops.pop() if op == "/": N *= 2 if op == "-": N = (N + 1) // 3 if op == "+": N = (N - 1) // 3 ops.append("-") N = 3 * N - 1 print(ops) break continue if N % 2 == 0: ops.append("/") N //= 2 else: ops.append("+") N = 3 * N + 1 print(len(ops)) print("".join(ops))