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