#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vint = vector<int>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long int a, b, c, x, y, r = 0;
  cin >> a >> b >> c >> x >> y;
  if (a / 2 + b / 2 <= c) {
    cout << a * x + b * y << "\n";
    return 0;
  }
  int m = min(x, y);
  r += c * (m * 2);
  x -= m;
  y -= m;
  if (x > 0) {
    if (a < c) {
      r += a * x;
    } else {
      r += c * x * 2;
    }
  }
  if (y > 0) {
    if (b < c) {
      r += b * y;
    } else {
      r += c * y * 2;
    }
  }
  cout << r << "\n";
  return 0;
}
