from collections import deque from collections import defaultdict N = int(input()) pre = defaultdict(lambda: -1) seen = defaultdict(lambda: False) s = 1 q = deque([s]) seen[1] = True lim = 10**18 while q: v = q.popleft() if v == N: break if v % 2: next = 2*v if next > lim: continue if not seen[next]: pre[next] = v seen[next] = True q.append(next) else: # 3m-1 if (v+1) % 3 == 0: next = (v+1)//3 if next <= lim and not seen[next]: pre[next] = v seen[next] = True q.append(next) # 3m+1 if (v-1) % 3 == 0: next = (v-1)//3 if next <= lim and not seen[next]: pre[next] = v seen[next] = True q.append(next) next = 2*v if next > lim: continue if not seen[next]: pre[next] = v seen[next] = True q.append(next) now = 1 ans = [] while now != N: past = pre[now] if past % 2 == 0: ans.append('/') else: if 3*past-1 == now: ans.append('-') else: ans.append('+') now = past print(len(ans)) print(''.join(ans[::-1]))