#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  string str;
  cin >> str;
  int ans = 1;
  for (int i = 0; i < n && str[i] == '1'; i++, ans++)
    ;
  printf("%d", min(ans, n));
  return 0;
}
