#include <bits/stdc++.h>
using namespace std;
char a[200];
char b[200];
int main() {
  int n;
  char c;
  cin >> n;
  getchar;
  for (int i = 0; i < n; i++) {
    c = getchar();
    a[i] = c - 48;
    b[i] = a[i];
  }
  a[1] += 1;
  int i = 1;
  while (a[i] == 2) {
    i++;
    a[i] += 1;
  }
  if (i > n)
    cout << n << endl;
  else
    cout << i << endl;
  return 0;
}
