#include <bits/stdc++.h>
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const int MAXN = 1e5 + 5;
const double eps = 1e-9;
using namespace std;
int n;
char tmp[MAXN];
void read() {
  scanf("%d", &(n));
  scanf("%s", tmp);
}
void solve() {
  int i;
  int ans = 0;
  for (i = (0); i < (n); i += (1))
    if (tmp[i] == '1')
      ans++;
    else
      break;
  if (i != n) ans++;
  printf("%d\n", (ans));
  ;
}
int main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    read();
    solve();
  }
  return 0;
}
