#include <bits/stdc++.h>
using namespace std;
int main() {
  int 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;
    if (x > y) sum = 2 * y * c + (x - y) * a;
  } else
    sum = a * x + b * y;
  cout << sum;
  return 0;
}
