#include <bits/stdc++.h>
using namespace std;
int X;
int Y;
int a[] = {0, 0, 0};
int get_max(int *X, int *Y) {
  int max;
  if (*X > *Y) {
    max = *X;
  } else {
    max = *Y;
  }
  return max;
}
int costf(int *X, int *Y, int *p, int *q, int *r, int a[]) {
  int cost = 9999999;
  if (*p + *r * 0.5 >= *X) {
    if (*q + *r * 0.5 >= *Y) {
      cost = *p * a[0] + *q * a[1] + *r * a[2];
    }
  }
  if (cost > 0) {
    return cost;
  } else {
    return 9999999;
  }
}
int ajst(int *s, int *t) {
  int tmp = *s - *t;
  if (*s - *t >= 0) {
    return tmp;
  } else {
    return 1;
  }
}
int main() {
  for (int i = 0; i < 3; ++i) {
    int tmp;
    cin >> tmp;
    a[i] = tmp;
  }
  cin >> X;
  cin >> Y;
  int p = 0;
  int q = 0;
  int r = 0;
  int max;
  int cost;
  int ans = 9999999;
  max = get_max(&X, &Y) * 2;
  for (int i = 0; i < max; ++i) {
    p = i;
    int tmp1 = ajst(&max, &p);
    for (int j = 0; j < tmp1; ++j) {
      q = j;
      int tmp2 = p + q;
      int tmp3 = ajst(&max, &tmp2);
      for (int k = 0; k < tmp3; ++k) {
        r = k;
        cost = costf(&X, &Y, &p, &q, &r, a);
        if (cost < ans) {
          ans = cost;
        }
      }
    }
  }
  printf("%d", ans);
  return 0;
}
