#include <bits/stdc++.h>
using namespace std;
char s[200];
int main() {
  int n, i, res = 0;
  cin >> n;
  cin >> s;
  for (i = 0; i < n; i++)
    if (s[i] == '1')
      res++;
    else
      break;
  if (i < n) res++;
  cout << res << endl;
  return 0;
}
