#include <iostream>
#include <string.h>
using namespace std;
int main()
{
cout<<"请输入。。。"<<endl;
char str[100]="";
char outstr[100]="";
cin.getline(str,100);
int len=strlen(str);
int i=0,j=0;
int cnt=1;
char c=str[0];
for(i=1;i<len;i++)
{
if(str[i]==c)
{
cnt++;
}
else
{
if(cnt==1)
{
outstr[j++]=c;
}
else
{
outstr[j++]=cnt+'0';
outstr[j++]=c;
}
c=str[i];
cnt=1;
}
}
if(c != str[j-1])
{
if(cnt == 1)
{
outstr[j++] = c;
}
else
{
outstr[j++] = cnt + '0';
outstr[j++] = c;
}
}
cout<<outstr<<endl;
return 0;
}