#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, e, f, m, m1, s1, o, o1, s;
  cin >> a >> b >> c >> d >> e >> f;
  if (f >= e) {
    m = min(b, c);
    m1 = min(m, d);
    s = m1 * f;
    b = abs(b - m1);
    c = abs(c - m1);
    d = abs(d - m1);
    o = min(a, d);
    s1 = o * e;
    cout << s + s1 << endl;
  } else if (e >= f) {
    m = min(a, d);
    s = m * e;
    a = abs(a - m);
    d = abs(d - m);
    o = min(b, c);
    o1 = min(o, d);
    s1 = o1 * f;
    cout << s + s1 << endl;
  }
  return 0;
}
