n=0 for c in raw_input():exec'nnn+/*===12n'[hash(c)%7%4::3];print n