AT_abc465_b [ABC465B] Parking 2
Description
There is a parking lot. The fee for parking in this lot is as follows:
- During the period from exactly $ L $ o'clock to exactly $ R $ o'clock, a fee of $ X $ is charged for each hour parked.
- During the period not covered above, a fee of $ Y $ is charged for each hour parked.
If a car is parked in this lot from exactly $ A $ o'clock to exactly $ B $ o'clock without crossing midnight, how much is the fee?
Input Format
The input is given from Standard Input in the following format:
> $ X $ $ Y $ $ L $ $ R $ $ A $ $ B $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
If a car is parked from $ 7 $ o'clock to $ 21 $ o'clock, the fee is as follows.
- For the $ 2 $ hours from $ 7 $ o'clock to $ 9 $ o'clock, a fee of $ 300 \times 2 = 600 $ is charged.
- For the $ 8 $ hours from $ 9 $ o'clock to $ 17 $ o'clock, a fee of $ 700 \times 8 = 5600 $ is charged.
- For the $ 4 $ hours from $ 17 $ o'clock to $ 21 $ o'clock, a fee of $ 300 \times 4 = 1200 $ is charged.
The answer is $ 600 + 5600 + 1200 = 7400 $ .
### Sample Explanation 2
If a car is parked from $ 17 $ o'clock to $ 20 $ o'clock, the fee is as follows.
- For the $ 3 $ hours from $ 17 $ o'clock to $ 20 $ o'clock, a fee of $ 500 \times 3 = 1500 $ is charged.
The answer is $ 1500 $ .
### Constraints
- $ 1 \leq X, Y \leq 1000 $
- $ 1 \leq L < R \leq 23 $
- $ 1 \leq A < B \leq 23 $
- All input values are integers.