#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, changes = 0, add = 1;
  string s;
  cin >> n >> s;
  for (i = 0; i < n; i++) {
    if (add) {
      if (s[i] == '0') add = 0;
      changes++;
    }
  }
  cout << changes << endl;
}
