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