#include <bits/stdc++.h>
char a[110];
int main() {
  int n, i, c, ans;
  scanf("%d%s", &n, a);
  i = 0, c = 1;
  ans = 0;
  while (i < n) {
    if (a[i] == '0') {
      if (c % 2 == 0) {
        break;
      } else {
        ans++;
        c = 0;
      }
    } else if (a[i] == '1') {
      if (c % 2 == 0)
        break;
      else {
        ans++;
      }
    }
    i++;
  }
  printf("%d\n", ans);
  return 0;
}
