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