import java.util.Scanner; class Minzemi { public static void main(String args[]) { Scanner stdIn = new Scanner(System.in); String min = stdIn.next(); //文字列 char pur = 'm'; int count = 0; //カウント for(char x: min.toCharArray()){ if(x == pur){ count++; } } System.out.println(count); } }