/*
This program reads a string and prints the number
of a's (lowercase or uppercase) is s, using a while 
loop.
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
	int n, i, count = 0;;
	string s;
	cout << "Enter a string: " << endl;
	getline(cin,s);
	n = s.size();
	i = 0;
	while (i < n)
	{
		if (tolower(s[i]) == 'a')
			count++;
		i++;
	}
	cout << count << endl;
	return 0;
}

