public static void main ( String [ ] args ) throws Exception {
  Scanner sc = new Scanner ( new FileReader ( new File ( "a.in" ) ) ) ;
  PrintWriter pw = new PrintWriter ( "a.out" ) ;
  int tc = sc . nextInt ( ) ;
  for ( int t = 1 ;
  t <= tc ;
  t ++ ) {
    int l = sc . nextInt ( ) ;
    String s = sc . nextLine ( ) ;
    int cnt = 0 ;
    int added = 0 ;
    for ( int i = 0 ;
    i <= l ;
    i ++ ) {
      if ( i > cnt ) {
        int need = i - cnt ;
        added += need ;
        cnt += need ;
      }
      cnt += s . charAt ( i + 1 ) - '0' ;
    }
    pw . printf ( "Case #%d: %d\n" , t , added ) ;
  }
  sc . close ( ) ;
  pw . close ( ) ;
}

public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( new FileReader ( new File ( " a . in " ) ) ) ; PrintWriter pw = new PrintWriter ( " a . out " ) ; int tc = sc . nextInt ( ) ; for ( int t = 1 ; t <= tc ; t ++ ) { int l = sc . nextInt ( ) ; String s = sc . nextLine ( ) ; int cnt = 0 ; int added = 0 ; for ( int i = 0 ; i <= l ; i ++ ) { if ( i > cnt ) { int need = i - cnt ; added += need ; cnt += need ; } cnt += s . charAt ( i + 1 ) - '0' ; } pw . printf ( " Case ▁ # % d : ▁ % d \n " , t , added ) ; } sc . close ( ) ; pw . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (character_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal) (identifier) (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))