#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m = 998244353) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return res;
}
long long inverse(long long a, long long m = 998244353) {
  return power(a, m - 2, m);
}
int main() {
  int n;
  string str;
  cin >> n;
  cin >> str;
  int ans = 1;
  for (int i = 0; i < n; i++) {
    if (str[i] == '1')
      ans++;
    else
      break;
  }
  ans = min(ans, n);
  cout << ans << endl;
}
