#include <bits/stdc++.h>
int n, i, x;
std::string s;
char c;
int main() {
  for (std::cin >> n >> s; i < n; ++i)
    if (c == s[i])
      break;
    else
      c = s[i], x++;
  std::cout << x << '\n';
}
