#include <bits/stdc++.h>
int main() {
  char str[200001];
  scanf("%s", str);
  int i = 0;
  int len = strlen(str);
  char **s;
  s = (char **)malloc(sizeof(char *) * len);
  int div[len];
  i = 0;
  while (i < len) div[i++] = 0;
  i = 0;
  int j = 0;
  while (i < len - 1) {
    if (str[i] == str[i - 1]) {
      if (div[i - 1] == 2)
        div[i] = 1;
      else
        div[i] = 2;
    }
    if (str[i] != str[i - 1] && str[i] != str[i + 1]) {
      div[i] = 1;
    }
    i++;
  }
  i = 0;
  int count = 0;
  while (i < len) {
    printf("%d文字目 %d\n", i, div[i]);
    if (div[i] == 2) count++;
    i++;
  }
  printf("%d\n", len - count);
  return (0);
}
