S = input() print(S.count("m"))