#pragma comment(linker,"/STACK:12000")
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<vector>
#include<time.h>
#define eps 1e-15
using namespace std;
int main()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	char c;
	int i;
	int k=0;
	scanf("%c", &c);
	i=c-'0';
	k++;
	while(scanf("%c", &c)!=EOF)
	{
		if(c>='0'&&c<='9')
		{
			if(c-'0'==i)
				k++;
			else
			{
				cout<<k<<i;
				k=1;
				i=c-'0';
			}
		}
	}
	cout<<k<<i;
	return 0;
}