#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
void findInStr(const vector<string>& ListaZnakow, int& increment, const string& strToSearch){
for(const auto& znak : ListaZnakow){
size_t pos = 0;
while ((pos = strToSearch.find(znak,pos)) != string::npos){
++pos;
++increment;
};
}
}
int main()
{
string s,tekst = "";
int wiersze = 0;
int slowa = 0;
int ileZnakiBiale = 0;
int ileZnakiCzarne = 0;
const vector<string> znakiBiale = {" "};
const vector<string> nowaLinia = {"\n"};
const vector<string> znakiCzarne = {"<",">","[","]"};
while(getline(cin,s),s!=""){
tekst+=(s+"\n");
}
stringstream stekst(tekst);
while(!stekst.eof()){
string slowo;
stekst >> slowo;
++slowa;
}
findInStr(znakiBiale,ileZnakiBiale,stekst.str());
findInStr(nowaLinia,wiersze,stekst.str());
findInStr(znakiCzarne,ileZnakiCzarne,stekst.str());
cout << "Slowa = " << --slowa << endl;
cout << "Wiersze = " << wiersze << endl;
cout << "Biale znaki = " << ileZnakiBiale << endl;
cout << "Czarne znaki = " << ileZnakiCzarne << endl;
return 0;
}