static int fib ( int n ) {
  Arrays . fill ( f , 0 ) ;
  if ( n == 0 ) return 0 ;
  if ( n == 1 || n == 2 ) return ( f [ n ] = 1 ) ;
  if ( f [ n ] == 1 ) return f [ n ] ;
  int k ;
  if ( ( n & 1 ) == 1 ) k = ( n + 1 ) / 2 ;
  else k = n / 2 ;
  if ( ( n & 1 ) == 1 ) f [ n ] = ( fib ( k ) * fib ( k ) + fib ( k - 1 ) * fib ( k - 1 ) ) ;
  else f [ n ] = ( 2 * fib ( k - 1 ) + fib ( k ) ) * fib ( k ) ;
  return f [ n ] ;
}

static int fib ( int n ) { Arrays . fill ( f , 0 ) ; if ( n == 0 ) return 0 ; if ( n == 1 || n == 2 ) return ( f [ n ] = 1 ) ; if ( f [ n ] == 1 ) return f [ n ] ; int k ; if ( ( n & 1 ) == 1 ) k = ( n + 1 ) / 2 ; else k = n / 2 ; if ( ( n & 1 ) == 1 ) f [ n ] = ( fib ( k ) * fib ( k ) + fib ( k - 1 ) * fib ( k - 1 ) ) ; else f [ n ] = ( 2 * fib ( k - 1 ) + fib ( k ) ) * fib ( k ) ; return f [ n ] ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (parenthesized_expression (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (return_statement (array_access array: (identifier) index: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal)))) alternative: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal))))))))) alternative: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal))))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier))))))) (return_statement (array_access array: (identifier) index: (identifier)))))