#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  cin.ignore(1);
  getline(cin, s);
  if (s.find_first_of('0') != string::npos)
    cout << s.find_first_of('0') + 1;
  else
    cout << s.length();
  return 0;
}
