#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3;
const int M = 1e6 + 7;
const long long MOD = 1e9 + 7;
const long long INF = 1e18 + 9;
const int SM = 1e3 + 8;
const int logN = 20, BL = 400;
const double EPS = 3e-16;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long ans1 = 0, ans2 = 0;
  ans1 = (min({a, d}) * e) + (min({b, c, d - min(a, d)}) * f);
  ans2 = (min({b, c, d}) * f) + (min(a, d - min({b, c, d})) * e);
  long long res = max({ans1, ans2});
  cout << res;
  return 0;
}
