import sys, math sys.setrecursionlimit(10**8) sys.set_int_max_str_digits(0) INF = 10**18 N = int(input()) def solve(m:int, history:list): if m == 1: if len(history) <= 10000: exit(print(''.join(history))) else: return if m%2 == 0: m //= 2 history.append('/') solve(m, history) history.pop() m *= 2 else: if 3*m + 1 < INF: m = 3*m + 1 history.append('+') solve(m, history) history.pop() m = (m - 1)//3 if 3*m - 1 < INF: m = 3*m - 1 history.append('-') solve(m, history) history.pop() m = (m + 1)//3 solve(N, [])