#include <bits/stdc++.h>
using namespace std;
struct p {
  int h;
  int w;
  int n;
  bool flag = false;
};
int main() {
  ios::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int commont_part = (x < y ? x : y);
  int sum = 0;
  if (a + b > 2 * c)
    sum += 2 * c * commont_part;
  else
    sum += commont_part * (a + b);
  if (x > y) {
    x -= y;
    if (a > 2 * c)
      sum += x * 2 * c;
    else
      sum += x * a;
  } else {
    y -= x;
    if (b > 2 * c)
      sum += y * 2 * c;
    else
      sum += y * b;
  }
  cout << sum;
  return 0;
}
