import java.util.*; public class Exercise153 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count = 0; String str = sc.next(); str = str.replace("-", ""); String[] strarray = str.split("m"); for(String letter: strarray){ if(letter.equals("in")){ count++; } } System.out.println(count); } }