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