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