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