#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string s;
  cin >> s;
  int ans = 1;
  for (int i = (0); i < (N - 1); ++i) {
    if (s[i] != s[i + 1])
      ans++;
    else {
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
