#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const long long MOD = 1000000007;
const long long INF = 1LL << 60;
long long xn[101010];
int solve() {
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long ans = 0;
  for (long long i = 0; i <= d; i++) {
    long long one = min(i, a);
    long long two = min(d - i, min(b, c));
    ans = max(ans, e * one + f * two);
  }
  cout << ans << endl;
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
}
