#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const int INF = 0x7fffffff;
const long long oo = 1e18;
const int N = 106;
const double pi = acos(-1.0);
int n, ans = 1, now;
char c;
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf(" %c", &c);
    now = c - '0';
    if (now)
      ans++;
    else
      break;
  }
  cout << ans << endl;
  return 0;
}
