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