#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
long long po(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long ans1 = 0, ans2 = 0;
  long long a1 = a, b1 = b, c1 = c, d1 = d;
  ans1 = min(a1, d1) * e;
  ans1 += min(d1 - min(a1, d1), min(b1, c1)) * f;
  ans2 = min(d, min(b, c)) * f;
  ans2 += min(d - min(d, min(b, c)), a) * e;
  cout << max(ans1, ans2) << '\n';
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
