print([string_operated.count("A") / len(string_operated) for string_operated in (input().split(),)][0])
F B A A B C A D
0.375
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!