#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int i = 0;
  while (i < s.length() && s[i] == '1') {
    s[i] = '0';
    i++;
  }
  if (i < s.length() && s[i] == '0') {
    s[i] = '1';
    i++;
  }
  cout << i << endl;
  return 0;
}
