from collections import Counter chirp = str(input().split()).replace("-", "").replace("min", "*") print(Counter(chirp)["*"])