#include <bits/stdc++.h>
int main() {
  char a[111], b[111];
  int len;
  while (scanf("%d %s", &len, &a) != EOF) {
    int rt = 1;
    int ans = 0;
    for (int i = 0; i < len; i++) {
      if (rt) ans++;
      if (a[i] == '1' && rt)
        rt = 1;
      else
        rt = 0;
    }
    printf("%d\n", ans);
  }
  return 0;
}
