import sys sys.setrecursionlimit(300000) def DFS(n): global ans if n == 1: print(len(ans)) print(''.join(ans)) exit() if 10000 <= len(ans): return if n % 2 == 0: n //= 2 ans.append('/') DFS(n) ans.pop() else: if 3 * n + 1 <= 10**18: n = 3 * n + 1 ans.append('+') DFS(n) ans.pop() if 3 * n - 1 <= 10**18: n = 3 * n - 1 ans.append('-') DFS(n) ans.pop() N = int(input()) ans = list() DFS(N)