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