public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int N = sc . nextInt ( ) ;
  int souwa = 0 ;
  souwa += N / 10 ;
  if ( N % 10 >= 1 ) {
    souwa ++ ;
  }
  souwa += N / 100 * 10 ;
  if ( N % 100 >= 10 ) {
    souwa += Math . min ( N % 100 - 9 , 10 ) ;
  }
  souwa += N / 1000 * 100 ;
  if ( N % 1000 >= 100 ) {
    souwa += Math . min ( N % 1000 - 99 , 100 ) ;
  }
  souwa += N / 10000 * 1000 ;
  if ( N % 10000 >= 1000 ) {
    souwa += Math . min ( N % 10000 - 999 , 1000 ) ;
  }
  souwa += N / 100000 * 10000 ;
  if ( N % 100000 >= 10000 ) {
    souwa += Math . min ( N % 100000 - 9999 , 10000 ) ;
  }
  souwa += N / 1000000 * 100000 ;
  if ( N % 1000000 >= 100000 ) {
    souwa += Math . min ( N % 1000000 - 99999 , 100000 ) ;
  }
  souwa += N / 10000000 * 1000000 ;
  if ( N % 10000000 >= 1000000 ) {
    souwa += Math . min ( N % 10000000 - 999999 , 1000000 ) ;
  }
  souwa += N / 100000000 * 10000000 ;
  if ( N % 100000000 >= 10000000 ) {
    souwa += Math . min ( N % 100000000 - 9999999 , 10000000 ) ;
  }
  souwa += N / 1000000000 * 100000000 ;
  if ( N % 1000000000 >= 100000000 ) {
    souwa += Math . min ( N % 1000000000 - 99999999 , 100000000 ) ;
  }
  if ( N == 1000000000 ) {
    souwa ++ ;
  }
  System . out . println ( souwa ) ;
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int souwa = 0 ; souwa += N / 10 ; if ( N % 10 >= 1 ) { souwa ++ ; } souwa += N / 100 * 10 ; if ( N % 100 >= 10 ) { souwa += Math . min ( N % 100 - 9 , 10 ) ; } souwa += N / 1000 * 100 ; if ( N % 1000 >= 100 ) { souwa += Math . min ( N % 1000 - 99 , 100 ) ; } souwa += N / 10000 * 1000 ; if ( N % 10000 >= 1000 ) { souwa += Math . min ( N % 10000 - 999 , 1000 ) ; } souwa += N / 100000 * 10000 ; if ( N % 100000 >= 10000 ) { souwa += Math . min ( N % 100000 - 9999 , 10000 ) ; } souwa += N / 1000000 * 100000 ; if ( N % 1000000 >= 100000 ) { souwa += Math . min ( N % 1000000 - 99999 , 100000 ) ; } souwa += N / 10000000 * 1000000 ; if ( N % 10000000 >= 1000000 ) { souwa += Math . min ( N % 10000000 - 999999 , 1000000 ) ; } souwa += N / 100000000 * 10000000 ; if ( N % 100000000 >= 10000000 ) { souwa += Math . min ( N % 100000000 - 9999999 , 10000000 ) ; } souwa += N / 1000000000 * 100000000 ; if ( N % 1000000000 >= 100000000 ) { souwa += Math . min ( N % 1000000000 - 99999999 , 100000000 ) ; } if ( N == 1000000000 ) { souwa ++ ; } System . out . println ( souwa ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (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) value: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (update_expression (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) (decimal_integer_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (update_expression (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))