#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); string S; cin >> S; int cnt = 0; rep(i, 0, S.size()) { if (S[i] == 'm') cnt++; } cout << cnt << '\n'; }