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