#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S,T;
  cin >> S;
  int j,count;
  count=0;
  T=S;
  while (j!=0){
    j=0;
    for (int i=0; i<S.size(); ){
      if (S.at(i)==S.at(i+1)){
      i=i+2;
      }
    else{
      T.push_back(S.at(i));
      count=count+1;
    }
      
  }
  


}