+ محدودیت زمان: ۱ ثانیه
+ محدودیت حافظه: ۲۵۶ مگابایت
---
After facing numerous challenges, Majid succeeded in escaping from the matrix. Upon exiting the matrix, he finds himself in an elevator on the $s-th$ floor of a building with $f$ floors. Majid quickly realizes that this elevator is not an ordinary one. The elevator has only two buttons: `Up` and `Down`. By pressing these buttons, the elevator moves $u$ floors up or $d$ floors down.
Specifically:
- After pressing `Up` button, if $c+u \leq f$, the elevator goes to floor $c+u$. Otherwise, the elevator remains stationary.
- After pressing `Down` button, if c-d \leq 1, the elevator goes to floor $c-d$. Otherwise, the elevator remains stationary. The only way to exit the building is the $g-th$ floor. Since exiting the elevator shouldn’t be easy, each time Majid presses either the `Up` or `Down` button, he has to pay a high cost. Shocked by the conditions, Majid asks you to calculate the minimum cost for him to exit the building.
# ورودی
In the only input line, you are given integers $f$, $s$, $g$, $u$, and $d$ separated by a space from left to right $(1 \leq s,g \leq f \leq 10^6, 0 \leq u,d \leq10^6)$.
# خروجی
In the only line of output, print the minimum number of times Majid needs to press the elevator buttons to exit the building. If it is impossible to reach from floor $s$ to floor $g$ using the elevator, print `use the stairs`.
## ورودی نمونه 1
```
10 1 10 2 1
```
## خروجی نمونه 1
```
6
```
## ورودی نمونه 2
```
100 2 1 1 0
```
## خروجی نمونه 2
```
use the stairs
```
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.