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