#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;
  long long sum;
  cin >> a >> b >> c >> x >> y;
  int k = min(x, y);
  if (2 * c < a + b)
    sum = c * k * 2;
  else
    sum = (a + b) * k;
  if (x > k) {
    if (2 * c < x)
      sum += 2 * c * (x - k);
    else
      sum += a * (x - k);
  }
  if (y > k) {
    if (2 * c < y)
      sum += 2 * c * (y - k);
    else
      sum += b * (y - k);
  }
  cout << sum;
  return 0;
}
