#include <bits/stdc++.h>
using namespace std;
set<long long> st;
vector<int> v, v2, vv;
string ss, tt, s1, s2;
char q, w;
char s[11], s3[11];
int idx[4] = {0, 1, 0, -1};
int idy[4] = {1, 0, -1, 0};
bool ic, cn, dc, hal;
int arr[128];
int n, x, y, d, m, t, a, b, c, res, cnt, tmp, mx = 0, mn = 1e9, sz;
bool srt(pair<string, int>& a, pair<string, int>& b) {
  return a.second > b.second;
}
int main() {
  scanf("%d", &n);
  cin >> s1;
  a = s1.find('0');
  if (a == -1) {
    printf("%d\n", n);
  } else {
    printf("%d\n", a + 1);
  }
  return 0;
}
