s = input() print(s.count('m'))