n = int(input()) operation_char = "" repeat_times = 0 while n != 1: if n % 2: if n % 4 == 1: n = 3*n + 1 operation_char += "+" else: n = 3*n - 1 operation_char += "-" else: n //= 2 operation_char += "/" repeat_times += 1 print(repeat_times) print(operation_char)