#include <bits/stdc++.h>
using namespace std;
int t, n;
long long a, b, c, d, e, f;
int main() {
  scanf("%lld%lld%lld%lld%lld%lld", &a, &b, &c, &d, &e, &f);
  long long ans = 0;
  if (e > f) {
    ans += min(a, d) * e;
    d -= min(a, d);
    a -= min(a, d);
    ans += min(d, min(b, c)) * f;
  } else {
    ans += min(d, min(b, c)) * f;
    d -= min(d, min(b, c));
    ans += min(a, d) * e;
  }
  printf("%lld\n", ans);
  return 0;
}
