#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, carry, change;
  string val, ans;
  cin >> n;
  cin >> val;
  carry = 1;
  change = 0;
  for (int i = 0; i < (int)val.size(); i++) {
    if (carry == 1) {
      if (val[i] == '0') carry = 0;
      change++;
    }
  }
  cout << change;
  return 0;
}
