import javax.sql.XAConnection;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    }
} import javax.sql.XAConnection; XAConnection javax.sql import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        } A + B < C * 2 A + B A B C * 2 C 2 {
            System.out.println(X * A + Y * B);
        } System.out.println(X * A + Y * B) System.out.println System.out System System.out X * A + Y * B X * A X A Y * B Y B {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        } int ans; ans if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            } X > Y X Y {
                ans = Y * 2 * C + (X - Y) * A;
            } ans = Y * 2 * C + (X - Y) * A ans Y * 2 * C + (X - Y) * A Y * 2 * C Y * 2 * C Y 2 C (X - Y) * A (X - Y) X Y A {
                ans = X * 2 * C + (Y - X) * B;
            } ans = X * 2 * C + (Y - X) * B ans X * 2 * C + (Y - X) * B X * 2 * C X * 2 * C X 2 C (Y - X) * B (Y - X) Y X B System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C)) System.out.println System.out System System.out Math.min(ans, Math.max(X, Y) * 2 * C) Math.min Math ans Math.max(X, Y) * 2 * C Math.max(X, Y) * 2 * C Math.max(X, Y) Math.max Math X Y 2 C String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    }
} Main
import javax.sql.XAConnection;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();

        if (A + B < C * 2) {
            System.out.println(X * A + Y * B);
        } else {
            int ans;
            if (X > Y) {
                ans = Y * 2 * C + (X - Y) * A;
            } else {
                ans = X * 2 * C + (Y - X) * B;
            }
            System.out.println(Math.min(ans, Math.max(X, Y) * 2 * C));
        }
    }
}