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