#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int v[maxn];
int plate[maxn];
int main() {
  int a, b, c, x, y, sum;
  cin >> a >> b >> c >> x >> y;
  int k = min(x, y);
  if (c < max(a, b)) {
    sum = c * k * 2;
    if (x > k) {
      sum += a * (x - k);
    }
    if (y > k) {
      sum += b * (y - k);
    }
  } else
    sum = a * x + b * y;
  cout << sum;
  return 0;
}
