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