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