N = int(input()) ans = '' s = set() while N != 1: if N % 2 == 0: N //= 2 ans += '/' else: if 3 * N + 1 not in s: N = 3 * N + 1 ans += '+' else: N = 3 * N - 1 ans += '-' s.add(N) print(len(ans)) print(ans)