#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main()
{
	FILE *fin;
	FILE *fout;
	fin=fopen("input.txt","r");
	fout=fopen("output.txt","w");
	int in;
	int current=-1;
	int count=0;
	int k;
	char str[1003];
	char buf[1003];
	fscanf(fin,"%s",str);
	in=atoi(str);
	int m;
	m=strlen(str)-1;
	str[0]='\0';
	for(int i=1;i<=pow(10.0,m);i*=10)
	{
		k=(((in/i)*i)%(i*10))/i;
		if(k==current) count+=10;
		else
		{
			if(i==1)	
			{
				current=k;
				count=10;
			}
			else
			{	
				count+=current;
				itoa(count,buf,10);
				strcat(buf,str);
				strcpy(str,buf);
				count=10;
				current=k;
			}
		}
	}
	count+=current;
	itoa(count,buf,10);
	strcat(buf,str);
	strcpy(str,buf);
	fprintf(fout,"%s",str);
	fclose(fin);
	fclose(fout);
	return 0;
}