#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0;
  cin >> n;
  cin.ignore();
  string cell;
  getline(cin, cell);
  for (int i = 0; i < n; i++)
    if (cell[i] == '1' && i == n - 1)
      cout << n;
    else
      for (int i = 0; i < n; i++)
        if (cell[i] == '1')
          sum++;
        else {
          cout << sum + 1;
          return 0;
        }
  return 0;
}
