#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
int a[2];
int main() {
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long sum = 0;
  if (e > f) {
    int k = min(a, d);
    sum += e * k;
    a -= k;
    d -= k;
    sum += min(b, min(c, d)) * f;
    cout << sum << endl;
  } else {
    long long k = min(b, min(c, d));
    sum += f * k;
    b -= k;
    d -= k;
    c -= k;
    sum += min(d, a) * e;
    cout << sum << endl;
  }
  return 0;
}
