ans = [] def f(n, d): if d >= 10**4 or n > 10**18: return -1 elif n == 1: print(len(ans)) print("".join(ans)) exit() if n % 2: ans.append("+") f(n * 3 + 1, d+1) ans.pop() ans.append("-") f(n * 3 - 1, d+1) ans.pop() else: ans.append("/") f(n//2, d+1) ans.pop() f(int(input()), 0)