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