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