import sys input = lambda :sys.stdin.readline()[:-1] def main(): N = int(input()) m = N i = 0 ans = [] while i <= 10000 and m < 10 ** 18 and m != 1: if m % 2== 0: m //= 2 ans.append("/") else: m = 3 * m + 1 ans.append("+") i += 1 if m != 1: m = N i = 0 ans = [] while i <= 10000 and m < 10 ** 18 and m != 1: if m % 2== 0: m //= 2 ans.append("/") else: if (3 * m - 1) % 4 == 0: m = 3 * m - 1 ans.append("-") elif (3 * m + 1) % 4 == 0: m = 3 * m + 1 ans.append("+") i += 1 print(i) print(*ans, sep="") if __name__ == '__main__': main()