static void exec ( Scanner in , PrintStream out ) {
  String N = in . next ( ) ;
  if ( N . length ( ) == 1 ) {
    out . println ( N ) ;
    return ;
  }
  if ( N . substring ( 0 , 2 ) . equals ( "10" ) ) {
    int sum = 10 ;
    if ( N . length ( ) > 2 ) {
      sum += Stream . of ( N . substring ( 2 ) . split ( "" ) ) . mapToInt ( Integer :: valueOf ) . sum ( ) ;
    }
    out . println ( sum ) ;
  }
  else {
    int sum = Stream . of ( N . split ( "" ) ) . mapToInt ( Integer :: valueOf ) . sum ( ) ;
    out . println ( sum ) ;
  }
}

static void exec ( Scanner in , PrintStream out ) { String N = in . next ( ) ; if ( N . length ( ) == 1 ) { out . println ( N ) ; return ; } if ( N . substring ( 0 , 2 ) . equals ( "10" ) ) { int sum = 10 ; if ( N . length ( ) > 2 ) { sum += Stream . of ( N . substring ( 2 ) . split ( " " ) ) . mapToInt ( Integer :: valueOf ) . sum ( ) ; } out . println ( sum ) ; } else { int sum = Stream . of ( N . split ( " " ) ) . mapToInt ( Integer :: valueOf ) . sum ( ) ; out . println ( sum ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (if_statement condition: (parenthesized_expression (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal))) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (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)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list (string_literal))))) name: (identifier) arguments: (argument_list (method_reference (identifier) (identifier)))) name: (identifier) arguments: (argument_list)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) name: (identifier) arguments: (argument_list (method_reference (identifier) (identifier)))) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))