S = list(input()) fin="" for s in S: if s!="-": fin+=s print(fin.count("min"))