#include <bits/stdc++.h>
using namespace std;
int n, v[4], i, k;
char x, c;
int main() {
  scanf("%d%c", &n, &c);
  k = n;
  for (i = 1; i <= n; i++) {
    scanf("%c", &x);
    if (x != '1') {
      k = i;
      break;
    }
  }
  printf("%d", k);
  return 0;
}
