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