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