#include <bits/stdc++.h>
int n;
using namespace std;
int allone(string str) {
  for (int i = 0; i < n; i++)
    if (str[i] == '0') return 0;
  return 1;
}
int main() {
  string in;
  cin >> n;
  cin >> in;
  string save = in;
  if (in[0] == '0') {
    cout << "1";
    return 0;
  } else {
    if (allone(in)) {
      cout << n;
      return 0;
    }
    int pos = 0;
    while (in[pos] != '0') {
      pos++;
    }
    cout << pos + 1;
    return 0;
  }
  return 0;
}
