#include <bits/stdc++.h>
using namespace std;
string to_string(char s) { return string(1, s); }
string to_string(string s) { return "\"" + s + "\""; }
template <typename T>
string to_string(vector<T>);
template <typename U, typename V>
string to_string(pair<U, V> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename T>
string to_string(vector<T> v) {
  string res = "[";
  for (int i = 0; i < (int)v.size() - 1; i++) res += to_string(v[i]) + ", ";
  if (!v.empty()) res += to_string(v.back());
  res += "]";
  return res;
}
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
void maxCost() {
  int cost = 0;
  int s1 = min(a, d);
  ;
  int s2 = min(b, c);
  s2 = min(s2, d);
  ;
  if (e > f) {
    cost += s1 * e;
    d -= s1;
    ;
    s2 = min(s2, d);
    cost += s2 * f;
  } else {
    cost += s2 * f;
    d -= s2;
    ;
    s1 = min(s1, d);
    cost += s1 * e;
  }
  cout << cost << endl;
}
int main() {
  cin >> a >> b >> c >> d >> e >> f;
  maxCost();
}
