#include #include #include #include #include using namespace std; typedef long long lint; #define MIN(a,b) ((a)<(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b)) int main() { int min = 0; string S; cin >> S; for (int i = 0; i < S.size(); i++) if (S[i] == 'm') min++; cout << min << endl; return 0; }