#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char s[n];
  cin >> s;
  int c = 0;
  while (s[c] == '1' && c < n) {
    c++;
  }
  if (c == n) {
    cout << n << endl;
  } else {
    cout << c + 1 << endl;
  }
  return 0;
}
