#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f, g, h;
  cin >> a >> b >> c >> d >> e >> f;
  if (f > e) {
    if (d < min(b, c)) {
      g = d;
      h = 0;
    } else {
      g = min(b, c);
      h = min((d - g), a);
    }
  } else {
    if (d < a) {
      h = d;
      g = 0;
    } else {
      h = a;
      g = min((d - h), min(b, c));
    }
  }
  cout << g * f + h * e << endl;
}
