#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, t, p, p1;
  cin >> a >> b >> c >> x >> y;
  t = x + y;
  if (2 * c < a + b) {
    if (x > y) {
      p = 2 * c * y + (x - y) * a;
      p1 = x * 2 * c;
      p = min(p, p1);
    } else {
      p = 2 * c * x + (y - x) * a;
      p1 = y * 2 * c;
      p = min(p, p1);
    }
  } else {
    p = a * x + b * y;
  }
  printf("%d\n", p);
  return 0;
}
