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