#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a * x + b * y < c * (x + y)) {
    cout << a * x + b * y << endl;
  } else {
    int _min = 1e9;
    int max_num = 2 * max(x, y);
    int lowest = min(a, b);
    while (0 <= max_num && max_num / 2 >= min(x, y)) {
      _min = min(_min, lowest * (max(x, y) - max_num / 2) + max_num * c);
      max_num -= 2;
    }
    cout << _min << endl;
  }
}
