let S = stdin.readLine var c, w1, w2 = 0 for s in S: case s of 'c': c += 1 of 'w': w2 += w1 w1 += c else: discard echo w2