The tram in Berland goes along a straight line from the point 0 to the point *s* and back, passing 1 meter per *t*<sub class="lower-index">1</sub> seconds in both directions. It means that the tram is always in the state of uniform rectilinear motion, instantly turning around at points *x* = 0 and *x* = *s*.

Igor is at the point *x*<sub class="lower-index">1</sub>. He should reach the point *x*<sub class="lower-index">2</sub>. Igor passes 1 meter per *t*<sub class="lower-index">2</sub> seconds. 

Your task is to determine the minimum time Igor needs to get from the point *x*<sub class="lower-index">1</sub> to the point *x*<sub class="lower-index">2</sub>, if it is known where the tram is and in what direction it goes at the moment Igor comes to the point *x*<sub class="lower-index">1</sub>.

Igor can enter the tram unlimited number of times at any moment when his and the tram's positions coincide. It is not obligatory that points in which Igor enter and exit the tram are integers. Assume that any boarding and unboarding happens instantly. Igor can move arbitrary along the line (but not faster than 1 meter per *t*<sub class="lower-index">2</sub> seconds). He can also stand at some point for some time.
The first line contains three integers *s*, *x*<sub class="lower-index">1</sub> and *x*<sub class="lower-index">2</sub> (2 ≤ *s* ≤ 1000, 0 ≤ *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub> ≤ *s*, *x*<sub class="lower-index">1</sub> ≠ *x*<sub class="lower-index">2</sub>) — the maximum coordinate of the point to which the tram goes, the point Igor is at, and the point he should come to.

The second line contains two integers *t*<sub class="lower-index">1</sub> and *t*<sub class="lower-index">2</sub> (1 ≤ *t*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub> ≤ 1000) — the time in seconds in which the tram passes 1 meter and the time in seconds in which Igor passes 1 meter.

The third line contains two integers *p* and *d* (1 ≤ *p* ≤ *s* - 1, *d* is either 1 or <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/a96155caca833b8e78612e472baac6dbdcf5eaaa.png" style="max-width: 100.0%;max-height: 100.0%;"/>) — the position of the tram in the moment Igor came to the point *x*<sub class="lower-index">1</sub> and the direction of the tram at this moment. If <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/ad5acd483f67f197ab7bb106f02b9d93b0d1f97a.png" style="max-width: 100.0%;max-height: 100.0%;"/>, the tram goes in the direction from the point *s* to the point 0. If *d* = 1, the tram goes in the direction from the point 0 to the point *s*.
In the first example it is profitable for Igor to go by foot and not to wait the tram. Thus, he has to pass 2 meters and it takes 8 seconds in total, because he passes 1 meter per 4 seconds. 

In the second example Igor can, for example, go towards the point *x*<sub class="lower-index">2</sub> and get to the point 1 in 6 seconds (because he has to pass 3 meters, but he passes 1 meters per 2 seconds). At that moment the tram will be at the point 1, so Igor can enter the tram and pass 1 meter in 1 second. Thus, Igor will reach the point *x*<sub class="lower-index">2</sub> in 7 seconds in total.
4 2 4
3 4
1 1
8
5 4 0
1 2
3 1
7
5 4 0
5 14
1 -1
55
10 7 2
7 9
9 -1
45
20 5 19
163 174
4 1
2436
1000 610 733
226 690
357 1
84870
40 31 14
628 1000
36 1
17000
100 20 83
186 434
64 -1
27342
200 179 81
126 457
37 -1
44786
400 30 81
193 1000
338 1
51000
500 397 440
202 1000
75 1
43000
600 443 587
260 1000
548 -1
144000
799 254 294
539 1000
284 -1
40000
801 489 351
86 702
125 1
96836
999 951 297
62 106
574 1
69324
1000 711 437
42 126
745 1
34356
1000 812 761
230 1000
696 -1
51000
1000 913 474
34 162
566 -1
71118
1000 394 798
155 673
954 -1
271560
1000 876 884
299 1000
825 1
8000
2 0 2
1 1
1 1
2
5 4 2
1 2
3 1
4
4 2 4
3 4
2 1
6
200 10 100
1 100
20 1
480
6 4 2
1 2
3 1
4
3 1 3
1 2
1 1
2
10 3 6
1 2
3 1
3
1000 50 51
1 3
50 1
1
100 1 2
1 100
1 1
1
5 1 4
1 100
1 1
3
10 0 5
1 100
7 1
18
5 4 1
1 100
4 -1
3
10 6 9
3 100
5 1
12
50 10 30
1 50
10 1
20
4 1 4
1 100
2 1
10
10 5 9
1 10
5 1
4
20 15 10
5 2
3 1
10
2 2 0
7 3
1 1
6
10 1 9
1 10
1 1
8
1000 2 902
1 1000
2 1
900
100 9 6
3 100
5 1
300
10 1 6
1 10
3 -1
9
1000 902 2
1 1000
902 -1
900
100 50 25
1 1000
10 1
165
5 3 0
1 2
4 -1
4
4 1 2
1 10
3 1
7
10 4 8
1 5
4 -1
12
print("_RANDOM_GUESS_1689598200.2275395")# 1689598200.22756