#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, s = 0;
  cin >> a >> b >> c >> x >> y;
  if (a + b > 2 * c) {
    if (x < y) {
      s += c * 2 * x;
      y = y - x;
      x = 0;
      if (y * b < y * 2 * c)
        s += y * b;
      else
        s += y * 2 * c;
      y = 0;
    } else if (x > y) {
      s += c * 2 * y;
      x = x - y;
      y = 0;
      if (x * a < x * 2 * c)
        s += x * a;
      else
        s += x * 2 * c;
      x = 0;
    }
  } else
    s = x * a + y * b;
  cout << s;
  return 0;
}
