#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int n, cnt = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char c;
    cin >> c;
    cnt++;
    if (c == '0') break;
  }
  cout << cnt;
  return 0;
}
