s = gets.chomp puts s.gsub(/mi[-]*n/o, '1').length