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