#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long s1, s2;
  s1 = min(a, d);
  long long t1 = 0, t2 = 0, ans = 0;
  t1 = min(a, d) * e + min(b, min(c, (d - min(a, d)))) * f;
  t2 = min(b, min(c, d)) * f + min((d - min(b, min(c, d))), a) * e;
  ans = max(t1, t2);
  cout << ans;
}
