#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e3;
int a[MaxN + 5];
int main() {
  int a, b, c, x, y, n, sum, ans;
  while (~scanf("%d %d %d %d %d", &a, &b, &c, &x, &y)) {
    ans = 0;
    sum = x;
    n = y;
    if (a + b > 2 * c) {
      ans += min(x, y) * 2 * c;
      x -= min(sum, n);
      y -= min(n, sum);
    }
    ans += a * x;
    ans += b * y;
    printf("%d\n", ans);
  }
  return 0;
}
