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