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