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