public static int numOfFriends ( int [ ] shylevels ) {
  int total = 0 ;
  int ret = 0 ;
  for ( int i = 0 ;
  i < shylevels . length ;
  ++ i ) {
    ret = Math . max ( ret , i - total ) ;
    total += shylevels [ i ] ;
  }
  return ret ;
}

public static int numOfFriends ( int [ ] shylevels ) { int total = 0 ; int ret = 0 ; for ( int i = 0 ; i < shylevels . length ; ++ i ) { ret = Math . max ( ret , i - total ) ; total += shylevels [ i ] ; } return ret ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (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: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))))) (return_statement (identifier))))