#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
          Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
int a, b, c, x, y;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c) {
    cout << a * x + b * y << "\n";
    return 0;
  } else {
    if (x > y) {
      cout << 2 * c * y + a * (x - y) << "\n";
      return 0;
    } else {
      cout << 2 * c * x + b * (y - x) << "\n";
      return 0;
    }
  }
}
