#include <bits/stdc++.h>
using namespace std;
template <class T>
T _abs(T n) {
  return (n < 0 ? -n : n);
}
template <class T>
T _max(T a, T b) {
  return (!(a < b) ? a : b);
}
template <class T>
T _min(T a, T b) {
  return (a < b ? a : b);
}
template <class T>
T sq(T x) {
  return x * x;
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
bool inside(T a, T b, T c) {
  return a <= b && b <= c;
}
template <class T>
void setmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T &a, T b) {
  if (b < a) a = b;
}
const double EPS = 1e-9;
const double BIG = 1e19;
const double pi = 3.1415926535897932384626433832795;
const int INF = 0x7f7f7f7f;
void solve() {
  int n, st = 0;
  string s;
  cin >> n >> s;
  if (s[0] == '1') {
    int i = 0;
    while (s[i] == '1' && i < s.size()) {
      ++st;
      i++;
    }
    if (i == s.size())
      cout << st << endl;
    else if (s[i] == '0')
      cout << ++st << endl;
    return;
  }
  cout << ++st << endl;
}
int main() {
  solve();
  return 0;
}
