#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int sx = x, sy = y;
  if (a + b > c * 2) {
    if (a > c * 2) {
      a = c;
      y -= sx;
    }
    if (b > c * 2) {
      b = c;
      x -= sy;
    }
    if (x < 0) {
      y += 0 - x;
      x = 0;
    }
    if (y < 0) {
      x += 0 - y;
      y = 0;
    }
    if (x > y)
      cout << (x - y) * a + c * y * 2;
    else
      cout << (y - x) * b + c * x * 2;
    return 0;
  }
  cout << x * a + y * b;
  return 0;
}
