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