S = [input()] def yeah(a): a.count("Y") a.count("E") a.count("A") a.count("R") a.count("!") print(yeah(S))