#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int diffA = C - A, diffB = C - B;
  long long res = 0;
  if (diffA + diffB <= 0) {
    if (diffA > diffB) {
      res += C * 2 * Y;
      if (X - Y >= 0) {
        res += A * (X - Y);
      }
    } else {
      res += C * 2 * X;
      if (Y - X >= 0) {
        res += B * (Y - X);
      }
    }
  } else {
    res += A * X + B * Y;
  }
  cout << res << endl;
}
