public static void solve ( long a , long b ) {
  int i = 0 ;
  long count = 0 ;
  while ( ( 1l << i ) / 2 <= b ) {
    int j = 0 ;
    while ( ( 1l << j ) < ( 1l << i ) / 2 ) {
      long x = ( ( 1l << i ) - 1 ) - ( 1l << j ) ;
      if ( x >= a && x <= b ) count ++ ;
      j ++ ;
    }
    i ++ ;
  }
  System . out . println ( count ) ;
}

public static void solve ( long a , long b ) { int i = 0 ; long count = 0 ; while ( ( 1l << i ) / 2 <= b ) { int j = 0 ; while ( ( 1l << j ) < ( 1l << i ) / 2 ) { long x = ( ( 1l << i ) - 1 ) - ( 1l << j ) ; if ( x >= a && x <= b ) count ++ ; j ++ ; } i ++ ; } System . out . println ( count ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) 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))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (decimal_integer_literal)) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (decimal_integer_literal)))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (expression_statement (update_expression (identifier)))) (expression_statement (update_expression (identifier))))) (expression_statement (update_expression (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))