static int solution ( String x ) {
  int count = 0 ;
  if ( x . charAt ( 0 ) == '<' ) {
    int a = x . indexOf ( '>' ) ;
    if ( a == - 1 ) {
      return x . length ( ) ;
    }
    else count += x . indexOf ( '>' ) ;
  }
  if ( x . charAt ( x . length ( ) - 1 ) == '>' ) {
    for ( int i = x . length ( ) - 1 ;
    i >= 0 ;
    i -- ) {
      if ( x . charAt ( i ) == '<' ) break ;
      else count ++ ;
    }
  }
  return count ;
}

static int solution ( String x ) { int count = 0 ; if ( x . charAt ( 0 ) == ' < ' ) { int a = x . indexOf ( ' > ' ) ; if ( a == - 1 ) { return x . length ( ) ; } else count += x . indexOf ( ' > ' ) ; } if ( x . charAt ( x . length ( ) - 1 ) == ' > ' ) { for ( int i = x . length ( ) - 1 ; i >= 0 ; i -- ) { if ( x . charAt ( i ) == ' < ' ) break ; else count ++ ; } } return count ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))) right: (character_literal))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (unary_expression operand: (decimal_integer_literal)))) consequence: (block (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) alternative: (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))) right: (character_literal))) consequence: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) 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: (character_literal))) consequence: (break_statement) alternative: (expression_statement (update_expression (identifier)))))))) (return_statement (identifier))))