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