N=int(input()) sosa="" for i in range(10000): if N%2 == 0: N/=2 sosa=sosa+"/" else: if i%3 == 0: N=N*3+1 sosa=sosa+"+" else: N=N*3-1 sosa=sosa+"-" if N==1: break print(len(sosa)) print(sosa)