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