#include<stdio.h>


int main()
{
unsigned int n;
int m;
int i,d;
int j=0;
int g=0;
int l=1;
scanf("%d", &n);
d=n;


while(d!=0)
{
  d/=10;
  j++;
}


  while(n){
  m=n%10;
  while(n%10==m)
    n/=10;
    l*=10;
    g+=m*l;
  }

printf("%d", g/10);



  
  
  
  
  return 0;
}



