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