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