#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int suit1 = min(a, d);
  int suit2 = min(b, min(c, d));
  long long cost = 0;
  for (int i = 0; i <= suit1; i++) {
    long long temp = i * e;
    temp += min(b, min(c, d - i)) * f;
    cost = max(cost, temp);
  }
  for (int i = 0; i <= suit2; i++) {
    long long temp = i * f;
    temp += min(a, d - i) * e;
    cost = max(cost, temp);
  }
  cout << cost << endl;
}
int main() {
  int q = 1;
  while (q--) {
    solve();
  }
  return 0;
}
