N = int(input()) ans = [] S = set([N]) def check(n, S): n = 3 * n - 1 while n % 2 == 0: if n in S: return False n //= 2 return n in S while N != 1: if N % 2 == 0: ans.append("/") N //= 2 elif check(N, S): ans.append("-") N = 3 * N - 1 else: ans.append("+") N = 3 * N + 1 S.add(N) print(len(ans)) print(*ans, sep="")