import sys sys.setrecursionlimit(10**8) m=int(input()) d=dict() ans=[] def dfs(m): if m==1: if len(ans)<=10**4: print(len(ans)) print("".join(ans)) exit() else:return if m%2==0: ans.append("/") dfs(m//2) ans.pop else: if 10**18<3*m+1: ans.append("-") dfs(3*m-1) ans.pop else: if m not in d: d[m]="+" ans.append("+") dfs(3*m+1) ans.pop else: ans.append("-") dfs(3*m-1) ans.pop dfs(m)