#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int ans = 0, a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  if (e < f) {
    int now = min(d, min(b, c));
    ans += now * f;
    b -= now;
    c -= now;
    d -= now;
  } else {
    int now = min(d, a);
    ans += now * e;
    a -= now;
    d -= now;
  }
  ans += e * min(a, d);
  ans += f * min(d, min(b, c));
  cout << ans << '\n';
  return 0;
}
