#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ch = 0;
  cin >> n;
  string s;
  cin >> s;
  bool add = true;
  for (int x = 0; x < n; x++) {
    if (add) {
      if (s[x] - '0')
        ch++;
      else {
        ch++;
        add = false;
      }
    } else {
      cout << ch << endl;
      return 0;
    }
  }
  cout << ch << endl;
}
