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