#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
char s[maxn];
int a[maxn], b[maxn];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    memset(b, 0, sizeof(b));
    scanf("%s", s);
    for (int i = 0; i < n; i++) a[i] = s[i] - '0';
    b[0] = a[0] + 1;
    for (int i = 0; i < n; i++) {
      if (b[i] > 1)
        b[i] = 0, b[i + 1] = a[i + 1] + 1;
      else
        b[i + 1] = a[i + 1];
    }
    int ans = 0;
    for (int i = 0; i < n; i++)
      if (a[i] != b[i]) ans++;
    printf("%d\n", ans);
  }
  return 0;
}
