def parse(s2):
    l=0
    opt=[]
    num=[]
    for i,c in enumerate(s2):
        if c=='*'or c=='/':
            num.append(int(s2[l:i]))
            l=i+1
            opt.append(c)
    num.append(int(s2[l:]))
    num.sort()
    res=""
    for i,c in enumerate(opt):
        res=res+str(num[i])
        res=res+c
    res=res+str(num[-1])
    return res



s=input()
s2=""
for i,c in enumerate(s):
    if c=='-'and s[i-1]!='+'and s[i-1]!='*'and s[i-1]!='*':
        s2=s2+'+'
    s2=s2+c
s_list=s2.split('+')
res=[]
num2=[]
for st in s_list:
    if len(st)==1 or len(st)==2:
        num2.append(int(st))
    elif len(st)>2:
        num2.sort()
        for c in num2:
            if c<0 and res and len(res[-1])<=2:
                res.pop()
            res.append(str(c))
            res.append('+')
        res.append(parse(st))
        num2.clear()
if len(num2)==0:
    res=''.join(res)
    print(res)
else:
    num2.sort()
    for c in num2:
        if c>0:
            res.append("+")
        res.append(str(c))
    res=''.join(res)
    print(res)
丑陋的代码,思路是在所有前边不是* / +号的 -号前插入+号,然后按+号split,按切出来大小大于二的串分割排序,大小大于二的串单独送入parse中分割排序,最后合并。