#include <bits/stdc++.h>
using namespace std;
int s, x1, x2, t1, t2, p, d;
int choice2 = 0;
void solve(int start, int dist) {
  if (start > dist) {
    if (d > 0) {
      choice2 += abs(start - s) * t1;
      choice2 += abs(s - dist) * t1;
      d = -1;
    } else
      choice2 += abs(start - dist) * t1;
  } else if (start < dist) {
    if (d > 0) {
      choice2 += abs(start - dist) * t1;
    } else {
      choice2 += start * t1;
      choice2 += abs(0 - dist) * t1;
      d = 1;
    }
  } else {
    choice2 += 0;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s >> x1 >> x2 >> t1 >> t2 >> p >> d;
  int choice1 = abs(x1 - x2) * t2;
  solve(p, x1);
  solve(x1, x2);
  cout << min(choice1, choice2);
}
