import java.util.Scanner; import java.lang.String; import java.util.regex.*; class A{ public static void main(String args[]) { int count=-1; Scanner sc = new Scanner(System.in); String s=sc.next(); Pattern p = Pattern.compile("mi-*n"); Matcher m = p.matcher(s); boolean a=true; while(a){ a = m.find(); count++; } System.out.print(count); } }