#include<iostream>
#include<string.h>
#include<conio.h>
using namespace std;
int main()
{
	const int d = 15;
	char p[21]; //tedad 20 makan bara esm va 1 bara null
	int i, n1=0, n2=0, n3=0;
	//daryaft asami
	cout << "tedade " << d << " Asami ra vared konid : ";
	for(i=0; i < d; i++)
	{
		cin >> p;
		//moghayese ba esme ali
		if(strcmp(p, "ali") == 0)
			n1++;
		//moghayese ba asami 5 harfi
		if(strlen(p) == 5)
			n2++;
		//moghayese ba harfe a ya A
		if(p[0] == 'a' || p[0] == 'A')
			n3++;
	}
	//Namayesh Natije
	cout << "Tedad Asami ali = " << n1 << endl;
	cout << "Tedad Asami 5 Harfi = " << n2 << endl;
	cout << "Tedad Asami A ya a = " << n3 << endl;
	getch();
}

