"""
Pre-Programming 61 Solution
By Teerapat Kraisrisirikul
"""

def main():
    """ Main function """
    value = input().count('A')

    if value > 0:
        print(value)
    else:
        print('Oops')

main()
