#include<iostream>
using namespace std;
int main()
{
	cout<<"put the Character string"<<endl;
	char cha[21];
	cin>>cha;
	int i=0;
	char* point_char=cha;
	for(;*point_char!='\0';point_char++)
	{
		if(*point_char=='a')
		{
			i++;
		}
	}
	cout<<i<<endl;
	return 0;
}