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