#include <bits/stdc++.h>
using namespace std;
const long long MAX_SIZE = 1e18 + 1;
const long long MOD = 1000000007;
const int INF = 114748364;
int main() {
  int n, k = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '1') {
      k++;
    } else {
      break;
    }
  }
  cout << min(k + 1, n) << endl;
}
