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