#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
const long long MAX = 1000001;
class BigInt {
 private:
  string s;
  vector<int> v;

 public:
  BigInt() { s = ""; }
  BigInt(string x) {
    int l = x.length();
    for (int i = l - 1; i >= 0; i--) {
      int n = int(x[i] - '0');
      v.push_back(n);
    }
  }
  BigInt operator+(BigInt b) {
    int n1 = v.size();
    int n2 = b.v.size();
    int rem(0), i;
    if (n1 < n2) {
      for (i = 0; i < n1; i++) {
        int res = v[i] + b.v[i] + rem;
        b.v[i] = res % 10;
        rem = res / 10;
      }
      for (int j = i; j < n2; j++) {
        int res = b.v[i] + rem;
        b.v[i] = res % 10;
        rem = res / 10;
      }
      while (rem) {
        b.v.push_back(rem % 10);
        rem /= 10;
      }
    } else {
      for (i = 0; i < n2; i++) {
        int res = v[i] + b.v[i] + rem;
        b.v[i] = res % 10;
        rem = res / 10;
      }
      for (int j = i; j < n1; j++) {
        int res = v[i] + rem;
        b.v[i] = res % 10;
        rem = res / 10;
      }
      while (rem) {
        b.v.push_back(rem % 10);
        rem /= 10;
      }
    }
    return b;
  }
  friend ostream &operator<<(ostream &output, const BigInt &a);
  friend istream &operator>>(istream &input, BigInt &b);
};
istream &operator>>(istream &input, BigInt &b) {
  input >> b.s;
  int l = b.s.length();
  for (int i = l - 1; i >= 0; i--) {
    int n = int(b.s[i] - '0');
    b.v.push_back(n);
  }
  return input;
}
ostream &operator<<(ostream &output, const BigInt &a) {
  int x = a.v.size();
  for (int i = x - 1; i >= 0; i--) {
    output << a.v[i];
  }
  return output;
}
bool primeCheck(long long n) {
  if (n == 2 || n == 3 || n == 5) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i += 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long power(long long x, long long y) {
  if (y == 0) return 1;
  long long p = power(x, y / 2) % mod;
  p = (p * p) % mod;
  if (!(y & 1)) return p;
  return (p * x) % mod;
}
long long Imod(long long a) {
  long long res = (power(a, mod - 2)) % mod;
  return res;
}
long long nCr(long long n, long long r) {
  vector<long long> v(r + 1);
  long long c(1);
  v[0] = c;
  for (long long j = 1; j <= r; j++) {
    long long l = Imod(j);
    v[j] = (((c * (n - j + 1)) % mod) * l) % mod;
    c = v[j];
  }
  return v[r];
}
int solve() {
  long long a, b, c, d, e, f, res1, res2;
  cin >> a >> b >> c >> d >> e >> f;
  long long s1 = min(a, d);
  res1 = s1 * e;
  if (d - s1 > 0) {
    long long z = min(d - s1, min(b, c));
    res1 += (f * z);
  }
  long long s2 = min(b, min(c, d));
  res2 = s2 * f;
  if (d - s2 > 0) {
    long long z = min(d - s2, a);
    res2 += (e * z);
  }
  cout << max(res1, res2);
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t(1);
  while (t--) solve();
  return 0;
}
