#include <iostream>
#include <string>
#include <stdlib.h>

using namespace std;

int
main() {
        // mi(-)*n
        int j = 2;
        int i = 0;
        string s;
        cin >> s;
        cerr << "s[2] = " << s[2] << endl;
        while (1) { 
                for (; s[j] == '-'; j++);
                // n
                j++;
                // \n | m
                cerr << "s[" << j << "] = " << s[j] << endl;
                i++;
                if (s[j] != 'm') {
                        cout << i << endl;
                        return 0;
                }
                // m
                j++;
                // i
                j++;
                // -
        }
        return 0;
}