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