from collections import defaultdict as dd import sys sys.setrecursionlimit(1 << 20) n = int(input()) dic = dd(lambda:"") ans = list() def dfs(v): if v == 1: ans.append(dic[v]) if v % 2 == 0: dic[v//2] = dic[v] + "/" v //= 2 dfs(v) else: if dic[3*v+1] == "": dic[3*v+1] = dic[v] + "+" dfs(3*v+1) elif dic[3*v-1] == "": dic[3*v-1] = dic[v] + "-" dfs(3*v-1) m = n dfs(m) #print(ans) print(len(ans[0])) print(ans[0])