#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e5;
int main() {
  int a, b, c, x, y, m;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  int alav = a + b;
  if (alav > 2 * c) {
    m = min(x, y);
    if (m % 2) {
      if (x > y) {
        if (a > 2 * c)
          m++;
        else
          m--;
      } else if (x < y) {
        if (b > 2 * c)
          m++;
        else
          m--;
      } else {
        if (x + y > 4 * c)
          m++;
        else
          m--;
      }
    }
    ans += 2 * m * c;
    x -= m, y -= m;
    if (x < 0) x = 0;
    if (y < 0) y = 0;
    int ff = x * a + y * b;
    if ((x + y) * c * 2 < ff)
      ans += (x + y) * c * 2;
    else
      ans += ff;
  } else {
    ans += x * a + y * b;
  }
  cout << ans << endl;
  return 0;
}
