i=0 for c in input():b='0('.find(c);print([i,c][b],end='');i+=b