#include <bits/stdc++.h>
using namespace std;
int ai[10005];
int main() {
  int a, b, c, x, y;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  int r;
  long long e, s;
  if (x > y) {
    r = y;
    if (r <= x)
      e = r * c * 2 + (x - y) * a;
    else
      e = r * c * 2;
    s = c * x * 2;
  } else {
    r = x;
    if (r <= y)
      e = r * c * 2 + (y - x) * b;
    else
      e = r * c * 2;
    s = y * c * 2;
  }
  long long q = x * a, w = b * y;
  if ((q + w) > e && e < s) {
    printf("%lld\n", e);
  } else if ((q + w) < e && (q + w) < s)
    printf("%lld\n", q + w);
  else if (s < (q + w) && s < e)
    printf("%lld\n", s);
  return 0;
}
