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