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