#include <bits/stdc++.h>
using namespace std;
unsigned long int min(unsigned long int a, unsigned long int b) {
  if (a < b)
    return a;
  else
    return b;
}
unsigned long int max(unsigned long int a, unsigned long int b) {
  if (a > b)
    return a;
  else
    return b;
}
unsigned long int func(unsigned long int a, unsigned long int b,
                       unsigned long int c, unsigned long int d,
                       unsigned long int e, unsigned long int f) {
  unsigned long int cost = 0;
  if (f > e) {
    unsigned long int x = min(b, min(c, d));
    cost += x * f;
    if (x == d) return cost;
    return cost + (min(a, d - x)) * e;
  } else if (e == f) {
    unsigned long int x1 = min(b, min(c, d));
    unsigned long int x2 = min(a, d);
    return min(d, x1 + x2) * e;
  } else {
    unsigned long int x = min(a, d);
    cost += x * e;
    if (x == d) return cost;
    return cost + min(b, min(c, (d - a))) * f;
  }
}
int main() {
  unsigned long int a, b, c, d, e, f, res;
  cin >> a >> b >> c >> d >> e >> f;
  res = func(a, b, c, d, e, f);
  cout << res;
  return 0;
}
