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