#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int x, y;
  cin >> x >> y;
  int sum = 0;
  if ((a + b) >= c * 2) {
    if (min(x, y) % 2 == 0) {
      sum += c * 2 * (min(x, y) / 2);
      if (x > y) {
        sum += a * (x - y);
      } else if (x < y) {
        sum += b * (y - x);
      }
    } else {
      if (x > y) {
        sum += b;
        sum += a * (x - y);
      } else if (x < y) {
        sum += a;
        sum += b * (y - x);
      } else {
        sum += (a + b);
      }
    }
  } else {
    sum += a * x;
    sum += b * y;
  }
  cout << sum << endl;
}
