#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e9 + 10;
const int N = 1e6 + 10;
const int INF = (0x7fffffff) / 2;
const int MOD = 1000000007;
const int MaxN = 1000;
int a[110];
int main() {
  int a, b, c, x, y;
  while (~scanf("%d %d %d %d %d", &a, &b, &c, &x, &y)) {
    int k = min(x, y), h = max(x, y);
    long long sum = 0;
    int xx = x, yy = y;
    if (a + b >= (2 * c)) {
      long long b = c * k * 2;
      sum += b;
      xx = xx - k, yy = yy - k;
      sum = sum + xx * a + yy * b;
    } else {
      sum = sum + x * a + y * b;
    }
    long long ans = 0;
    if (a >= c * 2 && b >= c * 2) {
      ans += h * c * 2;
    } else if (a >= c * 2 && b < c * 2) {
      ans = ans + c * 2 * x;
      y = y - x / 2;
      ans += y * b;
    } else if (a < c * 2 && b >= c * 2) {
      ans = ans + c * 2 * y;
      x = x - y / 2;
      ans += x * a;
    }
    long long cc;
    if (ans != 0)
      cc = min(sum, ans);
    else
      cc = sum;
    printf("%lld\n", cc);
  }
}
