N = int(input()) ops = [] while N != 1: if N >= 10**18 or len(ops) >= 10000: 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 break if N % 2 == 0: ops.append("/") N //= 2 else: ops.append("+") N = 3 * N + 1 print(len(ops)) print("".join(ops))