#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
const long long MOD = 1000000007LL;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b >= 2 * c) {
    if (x > y) {
      cout << y * c + (x - y) * a << endl;
    } else {
      swap(x, y);
      swap(a, b);
      cout << y * c + (x - y) * a << endl;
    }
    return 0;
  } else
    cout << x * a + b * y << endl;
}
