#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, t1, t2, c1, c2, cost, x, y, y1, x1, x2, x3, a, b, c, d, e,
      f;
  cin >> a >> b >> c >> d >> e >> f;
  t1 = min(b, c);
  t2 = a;
  if (t1 >= d) c1 = d * f;
  if (t1 < d) {
    x = t1 * f;
    y = d - t1;
    x1 = min(y, a) * e;
    c1 = x + x1;
  }
  if (t2 >= d) c2 = d * e;
  if (t2 < d) {
    x2 = t2 * e;
    y1 = d - t2;
    x3 = min(y1, t1) * f;
    c2 = x2 + x3;
  }
  cost = max(c1, c2);
  cout << cost << endl;
}
