def f(x): c = 0 while x % 2 == 0: c += 1 x //= 2 return c N = int(input()) c = [] while N != 1: if N % 2 == 0: N //= 2 c.append('/') elif f(3*N+1) > f(3*N-1): N = 3*N+1 c.append('+') else: N = 3*N-1 c.append('-') print(len(c)) print(''.join(c))