#include <bits/stdc++.h>
using namespace std;
int c, d, b;
string a;
int main() {
  cin >> b;
  cin >> a;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == '1' && c == 0) d++;
    if (a[i] == '0' && c == 0) {
      c = 1;
      d++;
    }
  }
  cout << d << endl;
  return 0;
}
