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