s = input() replaces = ["l", "o", "a", "s"] ans = 0 for i in range(len(s)): if s[i] in replaces: ans += 1 print(ans)