#include<stdio.h>
 int main(){
   unsigned int n,m,p,temp;
   unsigned int i,pom,b=10;
   scanf("%d",&n);
   p=n;
   

   
   temp=n%10;
   m=temp;
   n/=10;
    while(n!=0){
    pom=temp;
   
     temp=n%10;
     n/=10;
	if(pom!=temp){
	  m=m+temp*b;
	  b=b*10;
	}
   }
   printf("%u",m);
   return 0;
 }
	
   
