#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const double pi = 3.14159265358979323846;
const int inf = 1e9;
const long long INF = 1e18;
int main() {
  cin.tie(0), cout.tie(0);
  ios::sync_with_stdio(false);
  long long a, b, c, d, e, f, c1 = 0, c2 = 0;
  cin >> a >> b >> c >> d >> e >> f;
  c1 = min(a, d) * e + min({b, c, max(d - min(a, d), 0LL)}) * f;
  c2 = min({b, c, d}) * f + min(a, max(d - min({b, c, d}), 0LL)) * e;
  cout << max(c1, c2) << endl;
}
