#include<iostream>
#include<ctime>
int main()
{
using namespace std;
int ch;
int count=0;
clock_t start=clock();
while ((ch=cin.get())!=EOF)
{
cout.put(char(ch));
while(clock()-start<20*CLOCKS_PER_SEC);
cout<<++count;
}
cout<<endl<<count<<endl;
return 0;
}
#include<ctime>
int main()
{
using namespace std;
int ch;
int count=0;
clock_t start=clock();
while ((ch=cin.get())!=EOF)
{
cout.put(char(ch));
while(clock()-start<20*CLOCKS_PER_SEC);
cout<<++count;
}
cout<<endl<<count<<endl;
return 0;
}