#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int res = 0;
  if ((a + b) / 2 > c) {
    if (x >= y && a >= 2 * c)
      res = x * 2 * c;
    else if (x < y && a >= 2 * c)
      res = y * 2 * c;
    else if (x >= y)
      res = y * 2 * c + a * (x - y);
    else
      res = x * 2 * c + a * (y - x);
  } else {
    res = x * a + y * b;
  }
  cout << res;
  return 0;
}
