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