import java.util.Scanner; import java.util.regex.Matcher; public class Minmin { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String S = stdIn.nextLine(); int counter = 0; while (S.indexOf("mi") == 0) { S = S.substring(2); while (S.charAt(0) == '-') { S = S.substring(1); } if (S.charAt(0) == 'n') { counter++; } } System.out.println(counter); } }