#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
int main() {
  long long A, B, C, X, Y, ans = 0;
  A = read(), B = read(), C = read(), X = read(), Y = read();
  if (C * 2 <= A + B) {
    long long t = (X < Y ? X : Y);
    ans += t * 2 * C;
    X -= t, Y -= t;
    ans += X * A + Y * B;
  } else {
    ans = X * A + Y * B;
  }
  printf("%lld\n", ans);
  return 0;
}
