#include <bits/stdc++.h>
using namespace std;
clock_t __stt;
inline void TStart() { __stt = clock(); }
inline void TReport() {
  printf("\nTaken Time : %.3lf sec\n",
         (double)(clock() - __stt) / CLOCKS_PER_SEC);
}
template <typename T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T MAX(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
T ABS(T a) {
  return a > 0 ? a : (-a);
}
template <typename T>
void UMIN(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
void UMAX(T &a, T b) {
  if (b > a) a = b;
}
int n, ln[100005], st[100005], ed[100005], cnt, dp[100005][2];
char s[100005];
int main() {
  int i, j, k;
  scanf("%s", s);
  n = strlen(s);
  cnt = 1;
  ln[0] = 1;
  st[0] = ed[0] = (s[0] - 'a');
  for (i = 1; i < n; ++i) {
    if (s[i] == s[i - 1]) {
      ln[cnt] = 1;
      st[cnt] = ed[cnt] = (s[i] - 'a');
      ++cnt;
    } else {
      ++ln[cnt - 1];
      ed[cnt - 1] = (s[i] - 'a');
    }
  }
  for (i = 1; i < cnt; ++i) {
  }
  return 0;
}
