#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int sum = 0;
  bool flag = false;
  if (f > e) {
    int x = min(b, min(c, d));
    sum += f * x;
    b -= x;
    c -= x;
    d -= x;
    flag = true;
  } else {
    int y = min(a, d);
    sum += e * y;
    a -= y;
    d -= y;
  }
  if (flag == true) {
    int y = min(a, d);
    sum += e * y;
  } else {
    int x = min(b, min(c, d));
    sum += f * x;
  }
  cout << sum;
  return 0;
}
