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