import java.util.*;
import static java.lang.System.*;

public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    }
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    } main {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int a = cin.nextInt(); a cin.nextInt() cin.nextInt cin int b = cin.nextInt(); b cin.nextInt() cin.nextInt cin int c = cin.nextInt(); c cin.nextInt() cin.nextInt cin int x = cin.nextInt(); x cin.nextInt() cin.nextInt cin int y = cin.nextInt(); y cin.nextInt() cin.nextInt cin int ans = 1000000000; ans 1000000000 for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        } int i = 0; int i = 0; i 0 i <= 2 * 100000 i 2 * 100000 2 100000 i += 2 i += 2 i 2 {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        } {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        } int nowx = x - i / 2; nowx x - i / 2 x i / 2 i 2 int nowy = y - i / 2; nowy y - i / 2 y i / 2 i 2 int cost = c * i; cost c * i c i if (nowx > 0) cost += a * nowx; nowx > 0 nowx 0 cost += a * nowx cost a * nowx a nowx if (nowy > 0) cost += b * nowy; nowy > 0 nowy 0 cost += b * nowy cost b * nowy b nowy ans = Math.min(ans, cost) ans Math.min(ans, cost) Math.min Math ans cost out.println(ans) out.println out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    }
} Main
import java.util.*;
import static java.lang.System.*;

public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();
        int x = cin.nextInt();
        int y = cin.nextInt();
        int ans = 1000000000;
        for (int i = 0; i <= 2 * 100000; i += 2) {
            int nowx = x - i / 2;
            int nowy = y - i / 2;
            int cost = c * i;
            if (nowx > 0) cost += a * nowx;
            if (nowy > 0) cost += b * nowy;
            ans = Math.min(ans, cost);
        }
        out.println(ans);
    }
}
