#include <bits/stdc++.h>
using namespace std;
const int p = 998244353;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar();
  return x * f;
}
void print(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar(x % 10 + 48);
}
int qp(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (long long)ans * a % p;
    a = (long long)a * a % p;
    b >>= 1;
  }
  return ans % p;
}
int ans;
int main() {
  int a = read(), b = read(), c = read(), x = read(), y = read();
  if (2 * c <= a + b) {
    if (a > c) {
      ans = 2 * c * max(x, y);
    } else {
      if (x > y) {
        ans = 2 * c * y + (x - y) * a;
      } else
        ans = 2 * c * x + (y - x) * b;
    }
  } else
    ans = a * x + b * y;
  printf("%d\n", ans);
  return 0;
}
