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