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