#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, x, y, t, s = 0;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  t = min(x, y);
  d = e = c / 2;
  if (t * c * 2 > t * a + t * b) {
    s += t * a + t * b;
  } else {
    s += t * c * 2;
  }
  t = max(x, y) - min(x, y);
  if (t * (x > y ? a : b) > t * c) {
    s += t * c;
  } else {
    s += t * (x > y ? a : b);
  }
  printf("%d", s);
  return 0;
}
