#include <bits/stdc++.h>
using namespace std;
long long int a, b, c, d, e, f, sum;
int main() {
  cin >> a >> b >> c >> d >> e >> f;
  if (f >= e) {
    if (b <= c && b <= d) {
      sum = b * f;
      d = d - b;
      if (d <= a) {
        sum = sum + d * e;
      } else {
        sum = sum + a * e;
      }
      cout << sum << endl;
      return 0;
    } else if (c <= b && c <= d) {
      sum = c * f;
      d = d - c;
      if (d <= a) {
        sum = sum + d * e;
      } else {
        sum = sum + a * e;
      }
      cout << sum << endl;
      return 0;
    } else {
      sum = d * f;
      cout << sum << endl;
      return 0;
    }
  } else {
    if (d <= a) {
      sum = d * e;
      cout << sum << endl;
      return 0;
    } else {
      sum = a * e;
      d = d - a;
      if (b <= c && b <= d) {
        sum = b * f + sum;
        cout << sum << endl;
        return 0;
      } else if (c <= b && c <= d) {
        sum = c * f + sum;
        cout << sum << endl;
        return 0;
      } else {
        sum = d * f + sum;
        cout << sum << endl;
        return 0;
      }
    }
  }
}
