#include <bits/stdc++.h>
int n;
char str[1010];
int main() {
  int i, j, counter, res;
  while (scanf("%d", &n) != EOF) {
    scanf("%s", str);
    counter = 0;
    for (j = 0; str[j] != 0; j++) {
      if (str[j] == 49)
        counter++;
      else
        break;
    }
    if (counter == n)
      res = counter;
    else
      res = counter + 1;
    printf("%d\n", res);
  }
  return 0;
}
