#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0, i;
  cin >> n;
  string s;
  cin >> s;
  int k = 1;
  for (i = 0; i < n; i++) {
    if (s[i] == '1' && k == 1) {
      sum++;
    } else if (s[i] == '0' && k == 1) {
      sum++;
      k = 0;
    }
  }
  cout << sum;
  return 0;
}
