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