#include <bits/stdc++.h>
int main() {
  char a;
  char buf[10000];
  int k = 1;
  std::cin >> buf[0];
  for (int p = 0; 1; p++) {
    std::cin >> a;
    if (buf[p] != a) {
      buf[p] = a;
      k++;
      break;
    }
  }
  std::cout << k;
}
