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