#include #include using namespace std; int main() { string s; cin >> s; int m = 0; for(int i = 0; i < s.length(); i++) if(s[i] == 'm') m++; cout << m << endl; return 0; }