public static void main ( String [ ] args ) throws Exception {
  long n = nl ( ) , a = nl ( ) , b = nl ( ) , c = nl ( ) ;
  if ( n < a && n < b ) {
    pln ( 0 ) ;
  }
  else if ( n >= a && n < b ) {
    pln ( n / a ) ;
  }
  else if ( a <= ( b - c ) ) {
    pln ( n / a ) ;
  }
  else {
    long rem = ( n - b ) % ( b - c ) + c ;
    pln ( ( n - b ) / ( b - c ) + 1 + rem / a ) ;
  }
  flush ( ) ;
}

public static void main ( String [ ] args ) throws Exception { long n = nl ( ) , a = nl ( ) , b = nl ( ) , c = nl ( ) ; if ( n < a && n < b ) { pln ( 0 ) ; } else if ( n >= a && n < b ) { pln ( n / a ) ; } else if ( a <= ( b - c ) ) { pln ( n / a ) ; } else { long rem = ( n - b ) % ( b - c ) + c ; pln ( ( n - b ) / ( b - c ) + 1 + rem / a ) ; } flush ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))) alternative: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (identifier)))))))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list)))))