S = input() C = S.count("c") W = S.count("w") print(C,W) if C < W+1: print(C-1) else: print(W)