using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { var v = Console.ReadLine().Count(c => c == 'i'); Console.WriteLine(v); } } }