#include <iostream>
using namespace std;
int main() {
string wyraz;
cin >> wyraz;
int l1=0, l2=0;
for(int i=0; i<wyraz.size(); i++)
{
if (wyraz[i]=='A') l1++;
if (wyraz[i]=='a') l2++;
}
cout << "Ilosc A: " << l1 << endl;
cout << "Ilosc a: " << l2 << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCXN0cmluZyB3eXJhejsKCWNpbiA+PiB3eXJhejsKCQoJaW50IGwxPTAsIGwyPTA7CgkKCWZvcihpbnQgaT0wOyBpPHd5cmF6LnNpemUoKTsgaSsrKQoJewoJCWlmICh3eXJheltpXT09J0EnKSBsMSsrOwoJCWlmICh3eXJheltpXT09J2EnKSBsMisrOwoJfQoJCgljb3V0IDw8ICJJbG9zYyBBOiAiIDw8IGwxIDw8IGVuZGw7Cgljb3V0IDw8ICJJbG9zYyBhOiAiIDw8IGwyIDw8IGVuZGw7CgkKCXJldHVybiAwOwp9