public static void main ( String [ ] __ ) {
  char [ ] a = s . next ( ) . toCharArray ( ) , aa = Arrays . copyOf ( a , a . length ) , b = s . next ( ) . toCharArray ( ) , bb = Arrays . copyOf ( b , b . length ) ;
  for ( int i = 0 ;
  i < aa . length ;
  i ++ ) {
    if ( aa [ i ] != '9' ) {
      aa [ i ] = '9' ;
      break ;
    }
  }
  if ( bb [ 0 ] == '1' ) {
    for ( int i = 1 ;
    i < bb . length ;
    i ++ ) {
      if ( bb [ i ] != '0' ) {
        bb [ i ] = '0' ;
        break ;
      }
    }
  }
  else {
    bb [ 0 ] = '1' ;
  }
  System . out . println ( Math . max ( miare ( aa ) - miare ( b ) , miare ( a ) - miare ( bb ) ) ) ;
}

public static void main ( String [ ] __ ) { char [ ] a = s . next ( ) . toCharArray ( ) , aa = Arrays . copyOf ( a , a . length ) , b = s . next ( ) . toCharArray ( ) , bb = Arrays . copyOf ( b , b . length ) ; for ( int i = 0 ; i < aa . length ; i ++ ) { if ( aa [ i ] != '9' ) { aa [ i ] = '9' ; break ; } } if ( bb [ 0 ] == '1' ) { for ( int i = 1 ; i < bb . length ; i ++ ) { if ( bb [ i ] != '0' ) { bb [ i ] = '0' ; break ; } } } else { bb [ 0 ] = '1' ; } System . out . println ( Math . max ( miare ( aa ) - miare ( b ) , miare ( a ) - miare ( bb ) ) ) ; }
(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: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (field_access object: (identifier) field: (identifier))))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (field_access object: (identifier) field: (identifier)))))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) (break_statement))))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (character_literal))) consequence: (block (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 (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) (break_statement)))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (character_literal))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier)))))))))))