public void solve() throws IOException {
    int t = nextInt();
    for (int x = 0; x < t; x++) {
      int max = nextInt();
      int count = 0;
      int needed = 0;
      String input = nextToken();
      for (int y = 0; y <= max; y++) {
        int people = input.charAt(y) - '0';
        if (y > count) {
          needed += y - count;
          count = y;
        }
        count += people;
      }
      out.format("Case #%d: %d%n", x + 1, needed);
    }
  }