private static String getIndex ( Scanner scanner , int n ) {
  ArrayList < Integer > arrayList = new ArrayList < > ( ) ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    arrayList . add ( scanner . nextInt ( ) ) ;
  }
  if ( ! arrayList . contains ( 0 ) ) return "-1" ;
  int count = 0 ;
  int count0 = 0 ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    if ( arrayList . get ( i ) == 5 ) count ++ ;
    if ( arrayList . get ( i ) == 0 ) count0 ++ ;
  };
}

private static String getIndex ( Scanner scanner , int n ) { ArrayList < Integer > arrayList = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { arrayList . add ( scanner . nextInt ( ) ) ; } if ( ! arrayList . contains ( 0 ) ) return " - 1" ; int count = 0 ; int count0 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( arrayList . get ( i ) == 5 ) count ++ ; if ( arrayList . get ( i ) == 0 ) count0 ++ ; } ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) 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 (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) consequence: (return_statement (string_literal))) (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal))) consequence: (expression_statement (update_expression (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal))) consequence: (expression_statement (update_expression (identifier))))))))