#include <bits/stdc++.h>
using namespace std;
int64_t mod = 1e9 + 7;
int64_t mod1 = 1e9 + 5;
int64_t power(int64_t a, int64_t b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0)
    return power((((a % mod) * (a % mod)) % mod), b / 2) % mod;
  else
    return ((a % mod) * (power((((a % mod) * (a % mod)) % mod), b / 2) % mod)) %
           mod;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  double a, b, c;
  cin >> a >> b >> c;
  double t1, t2;
  cin >> t1 >> t2;
  double p, s;
  cin >> p >> s;
  if (b > c) {
    b = a - b;
    c = a - c;
    p = a - p;
    if (s == 1)
      s = -1;
    else
      s = 1;
  }
  if (t2 <= t1) {
    cout << (c - b) * t2;
    return 0;
  }
  if (s == 1) {
    if (p > b) {
      double q = ((2 * a - p) * t1 + b * t2) / (t2 - t1);
      if (q >= c) {
        cout << (c - b) * t2 << '\n';
      } else {
        double ans = (q - b) * t2 + (c - q) * t1;
        cout << ans << '\n';
      }
    } else {
      double q = ((-p) * t1 + b * t2) / (t2 - t1);
      if (q >= c) {
        cout << (c - b) * t2 << '\n';
      } else {
        double ans = (q - b) * t2 + (c - q) * t1;
        cout << ans << '\n';
      }
    }
  }
  if (s == -1) {
    double q = ((p)*t1 + b * t2) / (t2 - t1);
    if (q >= c) {
      cout << (c - b) * t2 << '\n';
    } else {
      double ans = (q - b) * t2 + (c - q) * t1;
      cout << ans << '\n';
    }
    return 0;
  }
}
