#include <bits/stdc++.h>
using namespace std;
int main() {
  clock_t start, end;
  start = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n;
  cin >> n;
  string s;
  cin.ignore();
  cin >> s;
  long long int t = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '1')
      t++;
    else
      break;
  }
  if (t < n)
    cout << t + 1;
  else
    cout << n;
  end = clock();
  cout << endl;
  double time_taken = double(end - start) / double(CLOCKS_PER_SEC);
  return 0;
}
