# # dzien = int(input("podaj numer dnia tygodnia"))
# # if dzien >= 1 and dzien <= 5:
# #     print("nie ma weekendu")
# # else:
# #     print("jest weekend") 




# # if dzien == 6 and dzien == 7:
# #     print("jest weekend")
# # elif dzien >= 8:
# #     print("nie ma takiego dnia tygodnia")
# # else:
# #     print("nie ma weekendu")

# # dzien = int(input("podaj numer dnia tygodnia"))

# # if dzien == 1:
# #     print("PONIEDZIAŁEK")
# # elif dzien == 2:
# #     print("WTOREK")
# # elif dzien == 3:
# #     print("ŚRODA")
# # elif dzien == 4:
# #     print("CZWARTEK")
# # elif dzien == 5:
# #     print("PIĄTEK")
# # elif dzien == 6:
# #     print("SOBOTA")
# # else:
# #     print("NIEDZIELA")
# import random


# ile = int(input("podaj ile razy losować"))
# losowe = []
# ile_zer = 0
# for i in range(ile):
#     liczba = random.randint(0,10)

#     if liczba != 5:
#         losowe.append(liczba)
#     if liczba == 0 :
#         ile_zer += 1

# print(len(losowe))
# print(losowe)
# print(ile_zer)
# losowe.count(" Piątki wylosowanych liczbach" and 5)
# # if 7 in losowe
tekst = input("wprowadź słowo")
ile = 0
for literka in tekst:
   if literka == "b":
    ile += 1
    print(ile)