#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int MAXN = 100;
const int MAXM = 100010;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int p = 0, ans = 1;
  while (s[p] == '1') {
    ans++;
    p++;
  }
  cout << min(n, ans) << endl;
  return 0;
}
