#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int m = min(x, y);
  int n = max(x, y);
  if (a > c && b > c) {
    cout << n * 2 * c;
  } else {
    int l = 0;
    int s = x * a + y * b;
    if (x > y) {
      l = 2 * m * c + (x - y) * a;
    } else {
      l = 2 * m * c + (y - x) * b;
    }
    int kqy = min(s, l);
    cout << kqy;
  }
  return 0;
}
