#include int main() { int n, m, i, j, tot, ext; char s[1005]; scanf (" %d", &n); for (i = 0; i < n; i++) { tot = ext = 0; scanf (" %d %s", &m, s); for (j = 0; j <= m; j++) { if (tot < j) { ext += j-tot; tot = j; } tot += s[j] - '0'; } printf("Case #%d: %d\n", i+1, ext); } return 0; }