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