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