static BigInteger solve ( ) {
  BigInteger r = new BigInteger ( in . next ( ) ) ;
  BigInteger t = new BigInteger ( in . next ( ) ) ;
  BigInteger x = new BigInteger ( "0" ) ;
  BigInteger y = new BigInteger ( "2000000000000000000" ) ;
  BigInteger ans = new BigInteger ( "0" ) ;
  while ( x . compareTo ( y ) != 1 ) {
    BigInteger m = x . add ( y ) . shiftRight ( 1 ) ;
    BigInteger tmp = m . multiply ( r ) . shiftLeft ( 1 ) . add ( m . multiply ( m . multiply ( m ) . shiftLeft ( 2 ) . subtract ( BigInteger . ONE ) ) . divide ( new BigInteger ( "3" ) ) ) . subtract ( m . subtract ( BigInteger . ONE ) . shiftLeft ( 1 ) . multiply ( m ) . multiply ( m . shiftLeft ( 1 ) . subtract ( BigInteger . ONE ) ) . divide ( new BigInteger ( "3" ) ) ) ;
    if ( tmp . compareTo ( t ) != 1 ) {
      ans = m ;
      x = m . add ( BigInteger . ONE ) ;
    }
    else y = m . subtract ( BigInteger . ONE ) ;
  }
  return ans ;
}

static BigInteger solve ( ) { BigInteger r = new BigInteger ( in . next ( ) ) ; BigInteger t = new BigInteger ( in . next ( ) ) ; BigInteger x = new BigInteger ( "0" ) ; BigInteger y = new BigInteger ( "2000000000000000000" ) ; BigInteger ans = new BigInteger ( "0" ) ; while ( x . compareTo ( y ) != 1 ) { BigInteger m = x . add ( y ) . shiftRight ( 1 ) ; BigInteger tmp = m . multiply ( r ) . shiftLeft ( 1 ) . add ( m . multiply ( m . multiply ( m ) . shiftLeft ( 2 ) . subtract ( BigInteger . ONE ) ) . divide ( new BigInteger ( "3" ) ) ) . subtract ( m . subtract ( BigInteger . ONE ) . shiftLeft ( 1 ) . multiply ( m ) . multiply ( m . shiftLeft ( 1 ) . subtract ( BigInteger . ONE ) ) . divide ( new BigInteger ( "3" ) ) ) ; if ( tmp . compareTo ( t ) != 1 ) { ans = m ; x = m . add ( BigInteger . ONE ) ; } else y = m . subtract ( BigInteger . ONE ) ; } return ans ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (while_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) name: (identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list (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 (field_access object: (identifier) field: (identifier)))))) name: (identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))))) alternative: (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))))))) (return_statement (identifier))))