# -*- coding: utf-8 -*- s = input() s = s.replace("-","") print(s.count("min"))