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