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