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