#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, sum;
  int xyav, xym;
  while (scanf("%d%d%d%d%d", &a, &b, &c, &x, &y) == 5) {
    sum = 0;
    xyav = (a + b) / 2;
    if (x > y) {
      xym = y;
      if (xyav > c)
        sum += c * y * 2;
      else
        sum += xyav * y * 2;
      if (a > (c * 2))
        sum += (x - y) * c * 2;
      else
        sum += (x - y) * a;
    } else if (x < y) {
      xym = x;
      if (xyav > c)
        sum += c * x * 2;
      else
        sum += xyav * x * 2;
      if (b > (c * 2))
        sum += (y - x) * c * 2;
      else
        sum += (y - x) * b;
    } else {
      if (xyav > c)
        sum = c * x * 2;
      else
        sum = xyav * x * 2;
    }
    printf("%d\n", sum);
  }
  return 0;
}
