public static void process ( ) throws IOException {
  int n = sc . nextInt ( ) ;
  int arr [ ] = sc . readArray ( n ) ;
  int zero = 0 ;
  int sum = 0 ;
  for ( int e : arr ) {
    if ( e == 0 ) zero ++ ;
    sum += e ;
  }
  if ( zero > 0 ) {
    sum += zero ;
  }
  if ( sum == 0 ) {
    System . out . println ( zero + 1 ) ;
  }
  else {
    System . out . println ( zero ) ;
  }
}

public static void process ( ) throws IOException { int n = sc . nextInt ( ) ; int arr [ ] = sc . readArray ( n ) ; int zero = 0 ; int sum = 0 ; for ( int e : arr ) { if ( e == 0 ) zero ++ ; sum += e ; } if ( zero > 0 ) { sum += zero ; } if ( sum == 0 ) { System . out . println ( zero + 1 ) ; } else { System . out . println ( zero ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_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: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (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))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (update_expression (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))))