#include<iostream>
#include<conio.h>
using namespace std;
//tabee
//az keboard vorodi begir namayesh bede va beshmar
void GetInputAndCount(int *c)
{
	char ch;
	while ((ch = getch()) != 'q' && ch != 'Q')
	{
		cout << ch;
		(*c)++;
	}
}

int main ()
{
	int count = 0;
	GetInputAndCount(&count);
	cout << endl << endl << "Tedad horof type shode = " << count;
	getch();
}

