#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    char text[256],s[]="., !?",*p;
    int nr=0;
    cout<<"Textul ";
    cin.get(text,255);
    cin.get();
    p=strtok(text,s);
    while(p){
        nr++;
        p=strtok(NULL,s);
    }
    cout<<"contine "<<nr<<" cuvinte"<<endl;
   // cout<<text;
    return 0;
}
