N = int(input()) ND = N MAXND = N ANS = [] while ND>1: if ND%2==0: ND=ND//2 ANS.append('/') elif ND>120: ND=ND*3-1 ANS.append('-') else: ND=ND*3+1 ANS.append('+') MAXND = max(MAXND,ND) if MAXND<=10**18 and len(ANS)<=10000: print(len(ANS)) print(''.join(ANS)) exit() ANS = [] S = set() while N>1: if N%2==0: N=N//2 ANS.append('/') elif not N in S: N=N*3-1 ANS.append('-') else: N=N*3+1 ANS.append('+') S.add(N) print(len(ANS)) print(''.join(ANS))