import sys sys.setrecursionlimit(10**7) N = int(input()) memo = {} def f(x): if x==1: return "" if x in memo: return memo[x] if x%2==0: k = 0 y = x while y%2==0: y //= 2 k += 1 memo[x] = "/"*k+f(y) return memo[x] else: if (3*x+1)%4==0: memo[x] = "+"+"/"*2+f((3*x+1)//4) return memo[x] else: memo[x] = "-"+"/"*2+f((3*x-1)//4) return memo[x] ans = f(N) print(len(ans)) print(ans)