#include <bits/stdc++.h>
using namespace std;
int mn1 = 1e9, res, mon, k;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  if (e > f) {
    res += (min(a, d) * e);
    mon = min(a, d);
    a -= mon;
    d -= mon;
    mn1 = min(min(b, c), d);
    res += (mn1 * f);
    d -= mn1;
    c -= mn1;
    b -= mn1;
  } else {
    mn1 = min(min(b, c), d);
    res += (mn1 * f);
    d -= mn1;
    c -= mn1;
    b -= mn1;
    res += (min(a, d) * e);
    mon = min(a, d);
    a -= mon;
    d -= mon;
  }
  cout << res;
  return 0;
}
