r=0 for c in raw_input():exec'r=r'+[c,'**'][c=='^']+"21"[c<'/'];print r