#include <bits/stdc++.h>
using namespace std;

int main() {
    int A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;

    int ans = 1e7;
    for (int i = 0; i < 200000; i++) {
        int sum = C * i;

        int a = X - i / 2;
        int b = Y - i / 2;
      
        if (0 < a) sum += a * A;
        if (0 < b) sum += b * B;

        ans = min(ans, sum);
    }
    cout << ans << endl;