#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
bool sortbysec(const pair<long long int, long long int> &a,
               const pair<long long int, long long int> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long int cost = 0;
  if (e <= f) {
    long long int su2 = min(min(b, c), d);
    cost += f * su2;
    b -= su2;
    c -= su2;
    d -= su2;
    long long int su1 = min(a, d);
    cost += e * su1;
    a -= su1;
    d -= su1;
    cout << cost << endl;
  } else {
    long long int su1 = min(a, d);
    cost += e * su1;
    a -= su1;
    d -= su1;
    long long int su2 = min(b, min(c, d));
    cost += f * su2;
    b -= su2;
    c -= su2;
    d -= su2;
    cout << cost << endl;
  }
  return 0;
}
