#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const int maxn = 1e5 + 5 * 1e4;
long long x1, s, x2, p, d, t1, t2;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> s >> x1 >> x2 >> t1 >> t2 >> p >> d;
  if (t2 <= t1) {
    cout << abs(x1 - x2) * t2;
    return 0;
  }
  if (x1 < x2) {
    long long tim = 0;
    if (d == -1) {
      tim += abs(p - 0) * t1;
      if (tim + x2 * t1 >= abs(x1 - x2) * t2) {
        cout << abs(x1 - x2) * t2;
        return 0;
      } else {
        cout << tim + x2 * t1;
        return 0;
      }
    } else {
      if (p <= x1) {
        if (abs(x2 - p) * t1 >= abs(x1 - x2) * t2) {
          cout << abs(x1 - x2) * t2;
          return 0;
        } else {
          cout << abs(x2 - p) * t1;
          return 0;
        }
      } else {
        tim += (abs(p - s) + s) * t1;
        if (tim + x2 * t1 >= abs(x1 - x2) * t2) {
          cout << abs(x1 - x2) * t2;
          return 0;
        } else {
          cout << tim + x2 * t1;
          return 0;
        }
      }
    }
  } else {
    long long tim = 0;
    if (d == 1) {
      tim += abs(p - s) * t1;
      if (tim + abs(x2 - s) * t1 >= abs(x1 - x2) * t2) {
        cout << abs(x1 - x2) * t2;
        return 0;
      } else {
        cout << tim + abs(x2 - s) * t1;
        return 0;
      }
    } else {
      if (p >= x1) {
        if (abs(x2 - p) * t1 >= abs(x1 - x2) * t2) {
          cout << abs(x1 - x2) * t2;
          return 0;
        } else {
          cout << abs(x2 - p) * t1;
          return 0;
        }
      } else {
        tim += (s + p) * t1;
        if (tim + abs(x2 - s) * t1 >= abs(x1 - x2) * t2) {
          cout << abs(x1 - x2) * t2;
          return 0;
        } else {
          cout << tim + abs(x2 - s) * t1;
          return 0;
        }
      }
    }
  }
  return 0;
}
