#include<iostream>
#include <string>
using namespace std;
int main()
{
string str;
cin>>str;
int len = str.size();
int NumOfChar;
for (int i =0; i<len;)
{
NumOfChar = 1;
int j = i+1;
if (j < len)
{
while( j< len && str[i] == str[j])
{
j++;
NumOfChar++;
}
cout<<str[i]<<NumOfChar;
i = j;
}
else
{
cout<<str[i]<<NumOfChar;
i++;
}
}
cout<<endl;
return 0;
}
#include <string>
using namespace std;
int main()
{
string str;
cin>>str;
int len = str.size();
int NumOfChar;
for (int i =0; i<len;)
{
NumOfChar = 1;
int j = i+1;
if (j < len)
{
while( j< len && str[i] == str[j])
{
j++;
NumOfChar++;
}
cout<<str[i]<<NumOfChar;
i = j;
}
else
{
cout<<str[i]<<NumOfChar;
i++;
}
}
cout<<endl;
return 0;
}